I don't think this is a race condition, snap auto-import was recently updated to only consider removable devices, so in order for snap auto-import to recognize your block device as a valid auto-import target, it must have the removable bit set in sysfs, see https://github.com/snapcore/snapd/blob/master/cmd/snap/cmd_auto_import.go#L293
TBH, it seems a bug that it worked for you on the third boot...
What I do to test auto-import of assertions with QEMU is to add the following options:
I don't think this is a race condition, snap auto-import was recently updated to only consider removable devices, so in order for snap auto-import to recognize your block device as a valid auto-import target, it must have the removable bit set in sysfs, see https:/ /github. com/snapcore/ snapd/blob/ master/ cmd/snap/ cmd_auto_ import. go#L293
TBH, it seems a bug that it worked for you on the third boot...
What I do to test auto-import of assertions with QEMU is to add the following options:
-drive "if=none, id=stick, format= raw,file= assertions. disk,cache= none" \ xhci,id= xhci \ bus=xhci. 0,removable= true,drive= stick \
-device nec-usb-
-device usb-storage,
-usb \
where assertions.disk is the disk image that you create with auto-import.assert