diff --git a/docs/reuse/troubleshooting/lxd-docker-networking.rst b/docs/reuse/troubleshooting/lxd-docker-networking.rst new file mode 100644 index 000000000..765bb9c71 --- /dev/null +++ b/docs/reuse/troubleshooting/lxd-docker-networking.rst @@ -0,0 +1,31 @@ +.. warning:: + + There is a `known connectivity issue with LXD and Docker + `_. If we see a + networking issue such as "*A network related operation failed in a context of no + network access*" or ``Client.Timeout``, we need to allow egress network traffic + to flow from the managed LXD bridge. + + First, list the available networks: + + .. code-block:: bash + + lxc network list + + The bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save its name to an + environment variable: + + .. code-block:: bash + + NETWORK_BRIDGE= + + Then update the network traffic flow: + + .. code-block:: bash + + sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT + sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT + sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ + --ctstate RELATED,ESTABLISHED -j ACCEPT + sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ + --ctstate RELATED,ESTABLISHED -j ACCEPT diff --git a/docs/tutorial/django.rst b/docs/tutorial/django.rst index c04d82b9c..d38beb03c 100644 --- a/docs/tutorial/django.rst +++ b/docs/tutorial/django.rst @@ -169,31 +169,7 @@ Pack the rock: :end-before: [docs:pack-end] :dedent: 2 -.. warning:: - There is a `known connectivity issue with LXD and Docker - `_. If we see a - networking issue such as "*A network related operation failed in a context - of no network access*" or ``Client.Timeout``, we need to allow egress network - traffic to flow from the managed LXD bridge. - - First, run ``lxc network list`` to show the available networks. The - bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save the name to an - environment variable: - - .. code-block:: - - NETWORK_BRIDGE= - - Then, update the network traffic flow using: - - .. code-block:: - - sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT - sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT +.. include:: /reuse/troubleshooting/lxd-docker-networking.rst Depending on the network, this step can take a couple of minutes to finish. @@ -597,4 +573,3 @@ your changes are not taking effect (e.g. the ``/time/`` 404), try running ``rockcraft clean`` and pack the rock again with ``rockcraft pack``. -.. _`lxd-docker-connectivity-issue`: https://documentation.ubuntu.com/lxd/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker diff --git a/docs/tutorial/express.rst b/docs/tutorial/express.rst index 91ecb5c44..5a262032c 100644 --- a/docs/tutorial/express.rst +++ b/docs/tutorial/express.rst @@ -177,31 +177,7 @@ Pack the rock: :end-before: [docs:pack-end] :dedent: 2 -.. warning:: - There is a `known connectivity issue with LXD and Docker - `_. If we see a - networking issue such as "*A network related operation failed in a context - of no network access*" or ``Client.Timeout``, we need to allow egress network - traffic to flow from the managed LXD bridge. - - First, run ``lxc network list`` to show the available networks. The - bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save the name to an - environment variable: - - .. code-block:: - - NETWORK_BRIDGE= - - Then, update the network traffic flow using: - - .. code-block:: - - sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT - sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT +.. include:: /reuse/troubleshooting/lxd-docker-networking.rst Depending on the network, this step can take a couple of minutes to finish. @@ -483,5 +459,4 @@ Upon changing the Express app and re-packing the rock, if the changes are not taking effect, try running ``rockcraft clean`` and pack the rock again with ``rockcraft pack``. -.. _`lxd-docker-connectivity-issue`: https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker .. _`install-multipass`: https://multipass.run/docs/install-multipass diff --git a/docs/tutorial/fastapi.rst b/docs/tutorial/fastapi.rst index 1c309b386..a1cf88026 100644 --- a/docs/tutorial/fastapi.rst +++ b/docs/tutorial/fastapi.rst @@ -155,31 +155,7 @@ Pack the rock: :end-before: [docs:pack-end] :dedent: 2 -.. warning:: - There is a `known connectivity issue with LXD and Docker - `_. If we see a - networking issue such as "*A network related operation failed in a context - of no network access*" or ``Client.Timeout``, we need to allow egress network - traffic to flow from the managed LXD bridge. - - First, run ``lxc network list`` to show the available networks. The - bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save the name to an - environment variable: - - .. code-block:: - - NETWORK_BRIDGE= - - Then, update the network traffic flow using: - - .. code-block:: - - sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT - sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT +.. include:: /reuse/troubleshooting/lxd-docker-networking.rst Depending on the network, this step can take a couple of minutes to finish. Since FastAPI is an experimental extension, @@ -567,5 +543,4 @@ your changes are not taking effect (e.g. the ``/time`` 404), try running ``rockcraft clean`` and pack the rock again with ``rockcraft pack``. -.. _`lxd-docker-connectivity-issue`: https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker .. _`install-multipass`: https://multipass.run/docs/install-multipass diff --git a/docs/tutorial/flask.rst b/docs/tutorial/flask.rst index fec53e20b..43872feb5 100644 --- a/docs/tutorial/flask.rst +++ b/docs/tutorial/flask.rst @@ -147,31 +147,7 @@ Pack the rock: :end-before: [docs:pack-end] :dedent: 2 -.. warning:: - There is a `known connectivity issue with LXD and Docker - `_. If we see a - networking issue such as "*A network related operation failed in a context - of no network access*" or ``Client.Timeout``, we need to allow egress network - traffic to flow from the managed LXD bridge. - - First, run ``lxc network list`` to show the available networks. The - bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save the name to an - environment variable: - - .. code-block:: - - NETWORK_BRIDGE= - - Then, update the network traffic flow using: - - .. code-block:: - - sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT - sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT +.. include:: /reuse/troubleshooting/lxd-docker-networking.rst Depending on the network, this step can take a couple of minutes to finish. @@ -555,4 +531,3 @@ your changes are not taking effect (e.g. the ``/time`` 404), try running ``rockcraft clean`` and pack the rock again with ``rockcraft pack``. -.. _`lxd-docker-connectivity-issue`: https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker diff --git a/docs/tutorial/go.rst b/docs/tutorial/go.rst index 344238a0b..c10486450 100644 --- a/docs/tutorial/go.rst +++ b/docs/tutorial/go.rst @@ -186,31 +186,7 @@ Pack the rock: :end-before: [docs:pack-end] :dedent: 2 -.. warning:: - There is a `known connectivity issue with LXD and Docker - `_. If we see a - networking issue such as "*A network related operation failed in a context - of no network access*" or ``Client.Timeout``, we need to allow egress network - traffic to flow from the managed LXD bridge. - - First, run ``lxc network list`` to show the available networks. The - bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save the name to an - environment variable: - - .. code-block:: - - NETWORK_BRIDGE= - - Then, update the network traffic flow using: - - .. code-block:: - - sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT - sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT +.. include:: /reuse/troubleshooting/lxd-docker-networking.rst Depending on the network, this step can take a couple of minutes to finish. @@ -485,5 +461,4 @@ Upon changing the Go app and re-packing the rock, if the changes are not taking effect, try running ``rockcraft clean`` and pack the rock again with ``rockcraft pack``. -.. _`lxd-docker-connectivity-issue`: https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker .. _`install-multipass`: https://multipass.run/docs/install-multipass diff --git a/docs/tutorial/springboot.rst b/docs/tutorial/springboot.rst index 1f1393640..da9911734 100644 --- a/docs/tutorial/springboot.rst +++ b/docs/tutorial/springboot.rst @@ -183,31 +183,7 @@ Pack the rock: :end-before: [docs:pack-end] :dedent: 2 -.. warning:: - There is a `known connectivity issue with LXD and Docker - `_. If we see a - networking issue such as "*A network related operation failed in a context - of no network access*" or ``Client.Timeout``, we need to allow egress network - traffic to flow from the managed LXD bridge. - - First, run ``lxc network list`` to show the available networks. The - bridge will have ``TYPE: bridge`` and ``MANAGED: YES``. Save the name to an - environment variable: - - .. code-block:: - - NETWORK_BRIDGE= - - Then, update the network traffic flow using: - - .. code-block:: - - sudo iptables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo ip6tables -I DOCKER-USER -i $NETWORK_BRIDGE -j ACCEPT - sudo iptables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT - sudo ip6tables -I DOCKER-USER -o $NETWORK_BRIDGE -m conntrack \ - --ctstate RELATED,ESTABLISHED -j ACCEPT +.. include:: /reuse/troubleshooting/lxd-docker-networking.rst Depending on the network, this step can take a couple of minutes to finish. @@ -493,5 +469,4 @@ Upon changing the Spring Boot app and re-packing the rock, if the changes are not taking effect, try running ``rockcraft clean`` and pack the rock again with ``rockcraft pack``. -.. _`lxd-docker-connectivity-issue`: https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-with-lxd-and-docker .. _`install-multipass`: https://multipass.run/docs/install-multipass diff --git a/rockcraft/commands/extensions.py b/rockcraft/commands/extensions.py index 7e2266c20..daabb3881 100644 --- a/rockcraft/commands/extensions.py +++ b/rockcraft/commands/extensions.py @@ -82,10 +82,10 @@ class ExtensionsCommand(ListExtensionsCommand, abc.ABC): class ExpandExtensionsCommand(AppCommand, abc.ABC): - """Expand the extensions in the snapcraft.yaml file.""" + """Expand the extensions in the rockcraft.yaml file.""" name = "expand-extensions" - help_msg = "Expand extensions in snapcraft.yaml" + help_msg = "Expand extensions in rockcraft.yaml" overview = textwrap.dedent( """ Extensions listed rockcraft.yaml will be