-
Notifications
You must be signed in to change notification settings - Fork 166
vm-disk from golden image stays unbound forever when target StorageClass differs from the image's #2908
Copy link
Copy link
Open
Labels
area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)Issues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next releasetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Metadata
Metadata
Assignees
Labels
area/storageIssues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)Issues or PRs related to storage (linstor, seaweedfs, bucket, velero, harbor)area/virtualizationIssues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)Issues or PRs related to virtualization (kubevirt, cdi, vmi, vm-import)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releaseMust be staffed and worked on either currently, or very soon, ideally in time for the next releasetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Creating a VM disk from a golden image into a StorageClass different from the one the golden images live in never completes: the temporary clone PVC stays unbound forever and no error is surfaced to the user. Reported in the community chat on v1.4.2 with LINSTOR storage (golden images in a replicated StorageClass, target disk in a node-local one); the relevant code is unchanged on main.
Symptom
vm-default-images-*DataVolumes incozy-public) live in a replicated StorageClass.vm-diskwithsource.imageand alocaltarget StorageClass.tmp-pvc-…incozy-publicwith the target StorageClass (WaitForFirstConsumer) plus aprep-…pod.Unable to attach or mount volumes: PVC cozy-public/tmp-pvc-… is not bound, and LINSTOR CSI logscontext deadline exceeded.Mechanism
packages/apps/vm-disk/templates/dv.yamlrenders a DataVolume whosesource.pvcpoints atcozy-public/vm-default-images-*whilestorage.storageClassNameis the user-selected target class, so picking any class other than the images' one produces a cross-StorageClass clone request.packages/system/kubevirt-cdi/templates/cdi-cr.yamlsets a globalcloneStrategyOverride: csi-cloneon the CDI CR.localStorageClass (placement count 1, no remote volume access) can only materialize a clone on a node that already holds the source data. With WaitForFirstConsumer the prep pod is scheduled without regard to source-data placement, so LINSTORCreateVolumecannot satisfy the request and times out; the exact LINSTOR-side failure mode (cross-resource-group clone vs node placement) is worth confirming from CSI logs, but both are unsatisfiable for alocaltarget here.Trigger vs root cause
Trigger: picking a target StorageClass different from the golden images' class. Root cause: the global
cloneStrategyOverride: csi-clone(introduced with the golden-disks feature in d38c8aa, switched from snapshot to csi-clone in 42778cf) bypasses the same-StorageClass guard and host-assisted fallback that CDI's default per-StorageProfile strategy selection would apply.Possible fix directions
Workaround
Create the disk in the same StorageClass the golden images live in (replicated in the default layout).