coreos-assembler
coreos-assembler copied to clipboard
Support disk reuse in kola tests
kola doesn't currently have a way to test Ignition reuse of partitions/filesystems/LUKS devices. This reuse can take two forms: reusing a partition on the boot disk by using coreos-installer to overwrite the initial part of the disk with a new OS image, and reuse of secondary disks by booting a new OS image with the secondary disks attached.
Consider supporting either or both reuse mechanisms in kola. This might be invoked from tests via an autopkgtest-reboot argument that causes the boot disk snapshot to be reverted or the OS to be reinstalled.
Implementation would be tricky. kola attaches qemu disks by file descriptor and then deletes the underlying file, to avoid leaking disks if a process is killed, and it doesn't retain the file descriptors itself. kola would need to retain access to the fd and then pass it to a successor qemu process. We can't handle the disk-reuse case by telling qemu to revert its snapshot of the pristine disk image, because there's no qemu command for that.