Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions docs/reuse/troubleshooting/lxd-docker-networking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. warning::

There is a `known connectivity issue with LXD and Docker
<https://documentation.ubuntu.com/lxd/en/latest/howto/network_bridge_firewalld/#prevent-connectivity-issues-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=<name of managed LXD 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
27 changes: 1 addition & 26 deletions docs/tutorial/django.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<lxd-docker-connectivity-issue_>`_. 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=<name of managed LXD 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.

Expand Down Expand Up @@ -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
27 changes: 1 addition & 26 deletions docs/tutorial/express.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<lxd-docker-connectivity-issue_>`_. 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=<name of managed LXD 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.

Expand Down Expand Up @@ -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
27 changes: 1 addition & 26 deletions docs/tutorial/fastapi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<lxd-docker-connectivity-issue_>`_. 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=<name of managed LXD 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,
Expand Down Expand Up @@ -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
27 changes: 1 addition & 26 deletions docs/tutorial/flask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<lxd-docker-connectivity-issue_>`_. 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=<name of managed LXD 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.

Expand Down Expand Up @@ -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
27 changes: 1 addition & 26 deletions docs/tutorial/go.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<lxd-docker-connectivity-issue_>`_. 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=<name of managed LXD 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.

Expand Down Expand Up @@ -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
27 changes: 1 addition & 26 deletions docs/tutorial/springboot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
<lxd-docker-connectivity-issue_>`_. 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=<name of managed LXD 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.

Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions rockcraft/commands/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down