Commit e58c799
authored
fix(vm): fix rootless upgrade migration for VMs with container disks (#2478)
Fixes live migration of container-disk VMs in kubevirt:
1. unknown user deckhouse: a 1.9 virt-handler probing a 1.8 launcher's container disk via virt-chroot --user deckhouse fails (the old launcher image has no deckhouse user), so the source VMI never syncs. GetImageInfo now falls back to the legacy qemu user when the launcher predates deckhouse (pkg/virt-handler/container-disk/hotplug.go).
2. Hotplug container disk not mounted on the migration target: findVirtlauncherUID matched the target launcher by its hotplug-disks dir, but a terminated pod left in ActivePods keeps that dir, so a lingering pod yields multiple matches and skips the bind-mount. It now keys off the launcher command socket (live pod only).
3. Blank qemu-img errors: some funcs used cmd.StderrPipe() + cmd.Output(). Wait() closed the pipe before stderr was read, so every failure logged with no reason. Switched to a captured bytes.Buffer.
---------
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
Signed-off-by: Daniil Loktev <70405899+loktev-d@users.noreply.github.com>1 parent fc1d822 commit e58c799
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments