[lxc-users] lxd-agent and Snap package

Stéphane Graber stgraber at stgraber.org
Tue Dec 8 01:11:13 UTC 2020


That's because we've since added support for virtiofs as an
alternative to 9p, fixing the CentOS issue so long as your qemu
supports virtiofsd.
We obviously ship virtiofsd in the snap package but have no control as
to what individual distributions support.

In this case you're seeing the agent work when run with the snap as
virtiofsd is started but when running it with your distro's native
package, you only get 9p which then prevents the VM from starting the
agent.

On Sat, Nov 28, 2020 at 4:45 PM David Lakatos <dlakatos847 at gmail.com> wrote:
>
> Hi LXC community,
>
> I read about the situation on multiple forums that CentOS 7 and CentOS 8 LXD VM images currently cannot start the lxd-agent.service due to a possible CentOS kernel bug. It seems that I hit the same issue, but found something really strange in the meantime, which I could not explain. Please help me out if you have any idea why there is a difference between the two scenarios' results:
>
> # id
> uid=0(root) gid=0(root) groups=0(root)
> # uname -a
> Linux dlakatos847-laptop 5.9.10-1-default #1 SMP Mon Nov 23 09:08:45 UTC 2020 (b7c3768) x86_64 x86_64 x86_64 GNU/Linux
>
> Scenario A: I use OpenSuSE Tumbleweed OSS repo's LXD package:
>
> # zypper in -y lxd
> ...
> Checking for file conflicts: ...................................................................................................................[done]
> (1/2) Installing: lxd-4.8-1.1.x86_64 ...........................................................................................................[done]
> (2/2) Installing: lxd-bash-completion-4.8-1.1.noarch ...........................................................................................[done]
> # systemctl start lxd.service
> # /usr/bin/lxc version
> Client version: 4.8
> Server version: 4.8
> # /usr/bin/lxd init
> ...
> # /usr/bin/lxc launch images:centos/7/amd64 centos --vm
> Creating centos
> Starting centos
> # /usr/bin/lxc ls
> +--------+---------+-----------------------+-----------------------------------------------+-----------------+-----------+
> | NAME   |  STATE  |         IPV4          |                     IPV6                      |      TYPE       | SNAPSHOTS |
> +--------+---------+-----------------------+-----------------------------------------------+-----------------+-----------+
> | centos | RUNNING | 10.137.136.143 (eth0) | fd42:3542:bbfa:726c:216:3eff:fe5f:670b (eth0) | VIRTUAL-MACHINE | 0         |
> +--------+---------+-----------------------+-----------------------------------------------+-----------------+-----------+
> # /usr/bin/lxc exec centos bash
> Error: Failed to connect to lxd-agent
>
> I checked, the lxd-agent.service could not start, looks like the same issue as explained by Stéphane:
> https://lists.linuxcontainers.org/pipermail/lxc-users/2020-October/015342.html
>
> Scenario B: I use the Snap package:
>
> # snap install lxd
> lxd 4.8 from Canonical* installed
> # /snap/bin/lxc version
> Client version: 4.8
> Server version: 4.8
> # /snap/bin/lxd init
> ... (use the same bridge lxdbr0) ...
> # /snap/bin/lxc launch images:centos/7/amd64 centos --vm
> Creating centos
> Starting centos
> # /snap/bin/lxc ls
> +--------+---------+----------------------+-----------------------------------------------+-----------------+-----------+
> |  NAME  |  STATE  |         IPV4         |                     IPV6                      |      TYPE       | SNAPSHOTS |
> +--------+---------+----------------------+-----------------------------------------------+-----------------+-----------+
> | centos | RUNNING | 10.137.136.89 (eth0) | fd42:3542:bbfa:726c:216:3eff:fe78:dc48 (eth0) | VIRTUAL-MACHINE | 0         |
> +--------+---------+----------------------+-----------------------------------------------+-----------------+-----------+
> # /snap/bin/lxc exec centos bash
> [root at localhost ~]#
>
> If the lxd-agent.service issue really is a CentOS bug, why does it matter if I use my distro's LXD or the Snap package? Why is it working, when I use the Snap package?
>
> Thank you,
> David Lakatos
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



-- 
Stéphane


More information about the lxc-users mailing list