Skip to content

vm-instance releases report Ready regardless of what the VirtualMachine is doing #4146

Open

Description

packages/system/vm-instance-rd/cozyrds/vm-instance.yaml declares no healthCheckExprs, so a VMInstance release reaches Ready as soon as Helm has applied its objects, regardless of what the VirtualMachine underneath is doing. A VM that never starts, or whose disk never populates, gives its owner a green application.

This is the same shape being closed for vm-disk, where a DataVolume that never binds left the release healthy for as long as it sat there. Disks were the case somebody reported; instances have the same hole and nobody has walked into it loudly yet.

The instrument exists and is already wired: spec.release.healthCheckExprs on the ApplicationDefinition is fed to the HelmRelease at pkg/cmd/server/start.go, and pkg/config/config.go selects the poller wait strategy when exprs are present. What a VMInstance gate needs is the CEL over KubeVirt's own VirtualMachine status rather than over CDI's, so it is a separate piece of work with its own phase vocabulary rather than a copy of the disk one.

Two things the disk work learned that apply here before anyone writes the expressions. A catch-all current swallows the shapes that mean "the controller is not driving this object", so the settled set has to be named rather than defaulted. And a gate on a slow operation needs its install window raised to match, or a healthy-but-slow start reports as a failed release for the rest of its run.

Worth checking the rest of the RD tree in the same pass: vm-disk-rd is currently the only ApplicationDefinition in the tree that sets healthCheckExprs at all, so the question of which other kinds report green while their workload is broken is open beyond these two.

Activity

  1. added
    kind/bugCategorizes issue or PR as related to a bug
    area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)
    on Sep 7, 2026
  2. added
    triage/acceptedIndicates an issue is ready to be actively worked on
    priority/backlogGeneral backlog priority. Lower than priority/important-longterm
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
  3. lexfrei commented on Sep 29, 2026

    @lexfrei
    ContributorAuthor

    healthCheckExprs can't close this, so I'm moving VM readiness to WorkloadMonitor instead.

    Two things block a release-level gate. vm-instance-rd sets release.cozystack.io/helm-install-disable-wait: "true" since #3735, and without the wait Flux doesn't evaluate the expressions at all. Turning the wait back on doesn't help either. Flux's StatusEvaluator returns InProgress while status.observedGeneration differs from metadata.generation, before any expression runs, and KubeVirt v1.9.0 sets observedGeneration only from a running VMI (syncGenerationInfo). A stopped VM would sit in InProgress until the timeout, which is the failure #3735 fixed. Flux already declined an opt-out for that check in fluxcd/kustomize-controller#1737.

    The plan is to report VM readiness through WorkloadMonitor's WorkloadsReady, the same way #4380 does for disks, with a deliberately stopped VM counted as ready. I'll start once #4380 is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)kind/bugCategorizes issue or PR as related to a bugpriority/backlogGeneral backlog priority. Lower than priority/important-longtermtriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions