[lxc-users] lxd-agent and Snap package
David Lakatos
dlakatos847 at gmail.com
Sat Nov 28 21:45:17 UTC 2020
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:
1. # 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]
2. # systemctl start lxd.service
3. # /usr/bin/lxc version
Client version: 4.8
Server version: 4.8
4. # /usr/bin/lxd init
...
5. # /usr/bin/lxc launch images:centos/7/amd64 centos --vm
Creating centos
Starting centos
6. # /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
|
+--------+---------+-----------------------+-----------------------------------------------+-----------------+-----------+
7. # /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:
1. # snap install lxd
lxd 4.8 from Canonical* installed
2. # /snap/bin/lxc version
Client version: 4.8
Server version: 4.8
3. # /snap/bin/lxd init
... (use the same bridge lxdbr0) ...
4. # /snap/bin/lxc launch images:centos/7/amd64 centos --vm
Creating centos
Starting centos
5. # /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
|
+--------+---------+----------------------+-----------------------------------------------+-----------------+-----------+
6. # /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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20201128/a6350f9a/attachment.htm>
More information about the lxc-users
mailing list