Skip to content

e2e: no upgrade test keeps a VMI-only hotplug volume attached across the switch to declarative hotplug #4463

Description

No test checks that a volume attached only to a running VMI stays attached when the platform moves to declarative volume hotplug. That move happens in #4453, which turns off the KubeVirt HotplugVolumes gate and so switches DeclarativeHotplugVolumes on. On its first reconcile virt-controller removes every hotpluggable VMI volume that VM.spec does not list. Migration 59 in that PR copies such volumes into VM.spec before the gate changes, so a tenant node whose disk an older kubevirt-csi attached at the VMI level keeps it.

The only coverage today is unit level. The migration has bats tests against a fake kubectl. No CI lane upgrades from the previous release, because every chainsaw suite installs the tree's own version. The upgrade lane in #3276 is not merged yet, and it does not cover this case either.

The test I have in mind:

  1. Install the previous release and start a VM.
  2. Hot-plug a volume through the VMI addvolume subresource, for example with an older virtctl and no --persist, and write data to it.
  3. Upgrade.
  4. Check that the volume is still attached, the data is readable, the VM is not RestartRequired, and the migration stamp advanced.

A kubevirt-csi detach on a tenant cluster after the upgrade belongs in the same test. After the upgrade the CSI controller runs with --enable-vmi-hotplug-fallback=false, and nothing exercises that path on a real cluster yet.

This fits the upgrade lane once it lands (Track B of #2847). Until then the check is manual.

Activity

  1. added
    kind/featureCategorizes issue or PR as related to a new feature
    area/testingIssues or PRs related to testing (e2e, bats, unit tests)
    area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)
    on Sep 24, 2026
  2. lexfrei commented on Oct 6, 2026

    @lexfrei
    ContributorAuthor

    #4453 is merged without this check. The review there asked for an N-1 upgrade run before merge but did not block on it: #4453 (review)

    So the live attach and detach across the gate change is still verified only by reading the code. The test above is the way to close that, now against the released version. Until the upgrade lane lands, a manual upgrade from the previous release on a throwaway cluster covers the same steps.

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/testingIssues or PRs related to testing (e2e, bats, unit tests)area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)kind/featureCategorizes issue or PR as related to a new featuretriage/needs-triageIndicates an issue needs triage by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions