UC20 does not auto-import assertions until the third boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
High
|
Unassigned |
Bug Description
I have created a UC20 image with latest snaps in stable. Then, I create a small disk image to hold a system-user assertion:
dd if=/dev/zero of=import.img bs=1024 count=100
mkfs.vfat import.img
mkdir mnt
mount import.img mnt/
cp auto-import.assert mnt/
umount mnt
I run qemu with both UC20 and import images attached as disks:
qemu-system-x86_64 -enable-kvm \
But, I cannot ssh into the device after waiting for a few minutes. If I stop qemu (by hard kill), then re-start it and wait again, I still cannot ssh into the VM. However, the *third time* I start qemu, I can finally ssh in the device with the user and password specified in the system-user assertion. I assume this should have been possible on first boot.
See attached tarball for the assertions.
FTR, if I simulate insertion of import.img using QEMU console 2-3 minutes after the system has started on first boot, the assertion is imported. So this is a race condition.
description: | updated |
Changed in snapd: | |
importance: | Undecided → High |
Changed in snapd: | |
status: | New → Triaged |
Looking at first boot log, auto-import is failing:
Nov 12 13:33:38 ubuntu systemd-udevd[575]: sdb: Process '/usr/bin/unshare -m /usr/bin/snap auto-import --mount=/dev/sdb' failed with exit code 127.
Maybe there is a race condition, as snapd starts some time later:
Nov 12 13:33:59 ubuntu systemd[1]: Started Snap Daemon.