This is my reproducer fwiw from the duplicate bug, LP: #2130710. It's
NOT nested LXD but two LXD containers with images with different dates
respectively in a KVM machine. The only differences I can think of
between two images are the deb versions of snapd and systemd. But
somehow, the second image doesn't install the seeded snapd.


# plucky to use v6.14 kernel
lxc launch --vm -e ubuntu:plucky test-vm-plucky -c limits.cpu=2 -c 
limits.memory=2GiB

sleep 30

lxc exec test-vm-plucky -- bash -xc '
    snap install lxd --channel 5.21/stable
    lxd init --auto
    # 3afbdbe6e57b: jammy 20251002, 6dcf029719ba: jammy 20251015
    for image in 3afbdbe6e57b 6dcf029719ba; do
        lxc launch -e ubuntu-daily:$image c-jammy-$image \
            -c user.user-data="#cloud-config
bootcmd: [\"echo CLOUD-INIT BOOTCMD RUN ✅\"]
runcmd:  [\"echo CLOUD-INIT RUNCMD RUN ✅\"]
"

        lxc exec c-jammy-$image -- bash -xc "
            timeout 30 cloud-init status --wait
            grep ✅ /var/log/cloud-init-output.log
            strings /snap/snapd/*/usr/lib/snapd/snap-exec | grep \"go1\.\"
            strings /usr/lib/snapd/snap-exec | grep \"go1\.\"
            systemctl list-jobs
            cat /var/lib/snapd/seed/seed.yaml
            snap version
            snap list
        "

    done

    diff -U0 <(lxc exec c-jammy-3afbdbe6e57b -- dpkg -l) <(lxc exec 
c-jammy-6dcf029719ba -- dpkg -l)
'



[output]

Launching test-vm-plucky
+ snap install lxd --channel 5.21/stable
2025-11-06T14:44:14Z INFO Waiting for automatic snapd restart...
Warning: /snap/bin was not found in your $PATH. If you've not restarted your 
session since you
         installed snapd, try doing that. Please see 
https://forum.snapcraft.io/t/9469 for more
         details.

lxd (5.21/stable) 5.21.4-7b6bd68 from Canonical✓ installed
+ lxd init --auto
+ for image in 3afbdbe6e57b 6dcf029719ba
+ lxc launch -e ubuntu-daily:3afbdbe6e57b c-jammy-3afbdbe6e57b -c 
'user.user-data=#cloud-config
bootcmd: ["echo CLOUD-INIT BOOTCMD RUN ✅"]
runcmd:  ["echo CLOUD-INIT RUNCMD RUN ✅"]
'
Launching c-jammy-3afbdbe6e57b
+ lxc exec c-jammy-3afbdbe6e57b -- bash -xc '
            timeout 30 cloud-init status --wait
            grep ✅ /var/log/cloud-init-output.log
            strings /snap/snapd/*/usr/lib/snapd/snap-exec | grep "go1\."
            strings /usr/lib/snapd/snap-exec | grep "go1\."
            systemctl list-jobs
            cat /var/lib/snapd/seed/seed.yaml
            snap version
            snap list
        '
+ timeout 30 cloud-init status --wait
.................................status: done
+ grep ✅ /var/log/cloud-init-output.log
CLOUD-INIT BOOTCMD RUN ✅
CLOUD-INIT RUNCMD RUN ✅
+ grep 'go1\.'
+ strings /snap/snapd/25202/usr/lib/snapd/snap-exec 
/snap/snapd/current/usr/lib/snapd/snap-exec
go1.23.10
        go1.23.10
go1.23.10
        go1.23.10
+ strings /usr/lib/snapd/snap-exec
+ grep 'go1\.'
go1.18.1
go1.18.1
+ systemctl list-jobs
No jobs running.
+ cat /var/lib/snapd/seed/seed.yaml
snaps:
  -
    name: core20
    channel: stable
    file: core20_2669.snap
  -
    name: snapd
    channel: stable
    file: snapd_25202.snap
  -
    name: lxd
    channel: 5.0/stable/ubuntu-22.04
    file: lxd_35819.snap
+ snap version
snap    2.71
snapd   2.71
series  16
ubuntu  22.04
kernel  6.14.0-35-generic
+ snap list
Name    Version        Rev    Tracking       Publisher   Notes
core20  20250730       2669   latest/stable  canonical✓  base
lxd     5.0.5-1edcd6e  35819  5.0/stable/…   canonical✓  -
snapd   2.71           25202  latest/stable  canonical✓  snapd

+ for image in 3afbdbe6e57b 6dcf029719ba
+ lxc launch -e ubuntu-daily:6dcf029719ba c-jammy-6dcf029719ba -c 
'user.user-data=#cloud-config
bootcmd: ["echo CLOUD-INIT BOOTCMD RUN ✅"]
runcmd:  ["echo CLOUD-INIT RUNCMD RUN ✅"]
'
Launching c-jammy-6dcf029719ba
+ lxc exec c-jammy-6dcf029719ba -- bash -xc '
            timeout 30 cloud-init status --wait
            grep ✅ /var/log/cloud-init-output.log
            strings /snap/snapd/*/usr/lib/snapd/snap-exec | grep "go1\."
            strings /usr/lib/snapd/snap-exec | grep "go1\."
            systemctl list-jobs
            cat /var/lib/snapd/seed/seed.yaml
            snap version
            snap list
        '
+ timeout 30 cloud-init status --wait
.................................................................................................................Received
 signal 15 resulting in exit. Cause:
  Filename: /usr/lib/python3/dist-packages/cloudinit/cmd/status.py
  Function: handle_status_args
  Line number: 248
    Filename: /usr/lib/python3/dist-packages/cloudinit/cmd/main.py
    Function: sub_main
    Line number: 1450
      Filename: /usr/lib/python3/dist-packages/cloudinit/cmd/main.py
      Function: main
      Line number: 1320
+ grep ✅ /var/log/cloud-init-output.log
CLOUD-INIT BOOTCMD RUN ✅
+ strings '/snap/snapd/*/usr/lib/snapd/snap-exec'
+ grep 'go1\.'
strings: '/snap/snapd/*/usr/lib/snapd/snap-exec': No such file
+ strings /usr/lib/snapd/snap-exec
+ grep 'go1\.'
go1.18.1
go1.18.1
+ systemctl list-jobs
JOB UNIT                                 TYPE  STATE
142 cloud-init.target                    start waiting
1   graphical.target                     start waiting
146 cloud-final.service                  start waiting
147 cloud-config.service                 start waiting
2   multi-user.target                    start waiting
126 snapd.seeded.service                 start running
106 snapd.autoimport.service             start waiting
156 systemd-update-utmp-runlevel.service start waiting

8 jobs listed.
+ cat /var/lib/snapd/seed/seed.yaml
snaps:
  -
    name: core20
    channel: stable
    file: core20_2669.snap
  -
    name: snapd
    channel: stable
    file: snapd_25202.snap
  -
    name: lxd
    channel: 5.0/stable/ubuntu-22.04
    file: lxd_35819.snap
+ snap version
snap    2.71+ubuntu22.04
snapd   2.71+ubuntu22.04
series  16
ubuntu  22.04
kernel  6.14.0-35-generic
+ snap list
No snaps are installed yet. Try 'snap install hello-world'.

++ lxc exec c-jammy-3afbdbe6e57b -- dpkg -l
+ diff -U0 /dev/fd/63 /dev/fd/62
++ lxc exec c-jammy-6dcf029719ba -- dpkg -l
--- /dev/fd/63  2025-11-06 14:47:41.198343646 +0000
+++ /dev/fd/62  2025-11-06 14:47:41.199343664 +0000
@@ -267 +267 @@
-ii  libnss-systemd:amd64            249.11-0ubuntu3.16                      
amd64        nss module providing dynamic user and group name resolution
+ii  libnss-systemd:amd64            249.11-0ubuntu3.17                      
amd64        nss module providing dynamic user and group name resolution
@@ -278 +278 @@
-ii  libpam-systemd:amd64            249.11-0ubuntu3.16                      
amd64        system and service manager - PAM module
+ii  libpam-systemd:amd64            249.11-0ubuntu3.17                      
amd64        system and service manager - PAM module
@@ -325 +325 @@
-ii  libsystemd0:amd64               249.11-0ubuntu3.16                      
amd64        systemd utility library
+ii  libsystemd0:amd64               249.11-0ubuntu3.17                      
amd64        systemd utility library
@@ -343 +343 @@
-ii  libudev1:amd64                  249.11-0ubuntu3.16                      
amd64        libudev shared library
+ii  libudev1:amd64                  249.11-0ubuntu3.17                      
amd64        libudev shared library
@@ -522 +522 @@
-ii  snapd                           2.68.5+ubuntu22.04.1                    
amd64        Daemon and tooling that enable snap packages
+ii  snapd                           2.71+ubuntu22.04                        
amd64        Daemon and tooling that enable snap packages
@@ -529 +529 @@
-ii  systemd                         249.11-0ubuntu3.16                      
amd64        system and service manager
+ii  systemd                         249.11-0ubuntu3.17                      
amd64        system and service manager
@@ -531,2 +531,2 @@
-ii  systemd-sysv                    249.11-0ubuntu3.16                      
amd64        system and service manager - SysV links
-ii  systemd-timesyncd               249.11-0ubuntu3.16                      
amd64        minimalistic service to synchronize local time with NTP servers
+ii  systemd-sysv                    249.11-0ubuntu3.17                      
amd64        system and service manager - SysV links
+ii  systemd-timesyncd               249.11-0ubuntu3.17                      
amd64        minimalistic service to synchronize local time with NTP servers
@@ -554 +554 @@
-ii  udev                            249.11-0ubuntu3.16                      
amd64        /dev/ and hotplug management daemon
+ii  udev                            249.11-0ubuntu3.17                      
amd64        /dev/ and hotplug management daemon

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2127244

Title:
  Nested LXD is broken with snapd 2.71+ubuntu22.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2127244/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to