Skip to content

fix(vm): fix rootless upgrade migration for VMs with container disks#2478

Open
loktev-d wants to merge 4 commits into
mainfrom
fix/vm/user-skew
Open

fix(vm): fix rootless upgrade migration for VMs with container disks#2478
loktev-d wants to merge 4 commits into
mainfrom
fix/vm/user-skew

Conversation

@loktev-d

@loktev-d loktev-d commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

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.

Why do we need it, and what problem does it solve?

What is the expected result?

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: fix
summary: fix rootless upgrade migration for VMs with container disks

Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d requested a review from Isteb4k as a code owner June 11, 2026 07:06
@loktev-d loktev-d marked this pull request as draft June 11, 2026 07:07
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jun 11, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jun 11, 2026
@loktev-d loktev-d added the e2e/run Run e2e test on cluster of PR author label Jun 11, 2026
@deckhouse-BOaTswain

deckhouse-BOaTswain commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jun 11, 2026
@loktev-d loktev-d added this to the v1.9.1 milestone Jun 15, 2026
@loktev-d loktev-d marked this pull request as ready for review June 15, 2026 10:44
loktev-d and others added 2 commits June 15, 2026 14:52
Signed-off-by: Daniil Loktev <70405899+loktev-d@users.noreply.github.com>
Signed-off-by: Daniil Loktev <lokt.daniil@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants