Repository navigation
vm-instance does not return to Ready across a platform upgrade (passes on fresh install) #3984
Description
What happens
A vm-instance VirtualMachine that exists before a platform upgrade does not come back within its chart's timeout after one. The HelmRelease reports:
Released=False reason=UpgradeFailed: Helm upgrade failed for release tenant-test/vm-instance-test
with chart [email protected]+16d84947b222:
timeout waiting for: [VirtualMachine/tenant-test/vm-instance-test status: 'InProgress']
The VM sits at InProgress for the full 10 minutes the chart waits, and the release is still not Ready 20 minutes later when the platform readiness gate gives up.
Why this is upgrade-specific
Both halves were observed in the same CI run, on the same commit and the same runner class, which is what makes this worth filing rather than treating as a flake:
- fresh install, in-tree suite:
--- PASS: chainsaw/vminstance (164.20s)— the identical workload comes up in under three minutes - across an upgrade,
v1.6.2 → main: the release above times out
So whatever this is, it is reached by upgrading a cluster that already runs the VM, not by creating one.
Evidence from the window, and what it does not prove
Two KubeVirt-side restarts fall inside the upgrade window, both worth checking before anything else:
cozy-kubevirt-cdi/cdi-uploadproxy (restarts=1)
F uploadproxy.go:104] Unable to create certwatcher: tls: failed to find any PEM data in certificate input
cozy-kubevirt/virt-api (restarts=1)
I am deliberately not claiming these are the cause. cdi-uploadproxy is not on the path that starts an existing VM, and a virt-api restart during a component upgrade is expected; the reason they are here is that a VM stuck at InProgress while its control plane is rolling is the shape those two would produce, and nothing else in the captured state pointed anywhere. The run's crust-gather snapshot for the failing suite is attached to the job's upgrade-cozyreport artifact and holds the VirtualMachine, VMI and virt-launcher state at failure time, which is where a root cause should come from.
Where it was found
The release upgrade E2E lane (#3276), on the v1.6.2 → main path: job log. That lane is advisory and gates nothing. While this is open it is recorded as the one expected not-Ready release in the lane's ledger, so a NEW upgrade failure is still distinguishable from this one; the ledger entry fails the lane if this release ever comes back Ready, so it cannot outlive the fix.
Activity
dosubot commentedon Aug 28, 2026
myasnikovdaniil This looks like the same failure mode already tracked in #3734 ("vm-instance releases never converge: kstatus observedGeneration pre-check gates healthy KubeVirt VMs"), with a mitigation open in PR #3735.
The root cause identified there: since helm-controller v1.5.0, the vm-instance HelmRelease is health-assessed by the kstatus poller, whose CEL status evaluator has a built-in pre-check — if
status.observedGenerationtrailsmetadata.generation, it returnsInProgressbefore any other logic runs, and this pre-check cannot be overridden byhealthCheckExprs[1]. KubeVirt legitimately keeps a VirtualMachine'sobservedGenerationbehindgenerationwhenever aspec.templatechange is pending a restart, a VM is stopped, or via the open upstream bugkubevirt/kubevirt#18700[1]. So a healthy, running VM reads as permanentlyInProgress, and the release times out with exactly thetimeout waiting for: [VirtualMachine/... status: 'InProgress']message you quoted.This explains the upgrade-vs-fresh-install split: on a fresh install the VM's generation and observedGeneration start aligned, but a VM that already existed before the upgrade is likely to carry a stale
observedGeneration. Specifically,observedGenerationis sourced from the VMI annotationkubevirt.io/vm-generation, whichconditionallyBumpGenerationAnnotationOnVmionly bumps when the running VMI's spec exactly matches the ControllerRevision it started from — any unactioned template change leaves it stale indefinitely [2].The mitigation in #3735 sets
release.cozystack.io/helm-install-disable-wait: "true"on the vm-instance ApplicationDefinition so the HelmRelease no longer waits on VirtualMachine readiness at all, restoring pre-1.5.0 behavior. An independent v1.6.1 lab confirmed this fix, with disk hotplug operations dropping from ~7 min to ~40 s and no further failed revisions [2]. That same report noted that existing HelmReleases only pick up the new spec on their next write through the apps API, and thatcozystack-apimay need a manual restart since the annotation isn't hashed intoconfig-hash[2].Given this closely matches your report (same error string, same upgrade-vs-fresh-install split, same
InProgressstall), thevirt-api/cdi-uploadproxyrestarts you observed are likely a red herring — the kstatus/observedGeneration gap is the more probable driver. You could confirm by checking whether your CI run's VM hadobservedGeneration < generationbefore the upgrade kicked in.To reply, just mention @dosu.
Docs are dead. Just use Dosu.
test(e2e): record the upgrade lane's known failure instead of staying…
crossRT commentedon Aug 31, 2026
i encounter this exactly same issue when upgrading cozystack from v1.6.1 to v1.6.2.
i saw this message saying the VirtualMachine status stuck on InProgress.
but i checked it's actually Ready, and failed to figure out what causing this.
here's the helm logs.
crossRT commentedon Aug 31, 2026
updates: i resolved this issue by shutting down the VM, wait the HR reconcile again.
and the HR status will back to normal.
lexfrei commentedon Sep 2, 2026
Same mechanism as #3734: the vm-instance ApplicationDefinition has no release.cozystack.io/helm-install-disable-wait, so the kstatus observedGeneration pre-check gates the release. Stopping the VM realigns generation and observedGeneration, which is why the workaround in the last comment works. Closing as a duplicate; the fix is PR #3735.