-
Bug
-
Resolution: Done
-
Undefined
-
None
-
MTC 1.8.12
-
None
-
None
-
False
-
-
False
-
ToDo
-
-
-
Low
Version-Release number of selected component (if applicable):
CNV 4.19.15 + MTC 1.8.12 CNV 4.20.3 + MTC 1.8.12
How reproducible:
Always
Steps to Reproduce:
1. Create a PVC via the console manually (not a DataVolume for a VM) 2. Create VM with a single disk, setup like this, referring to that PVC spec: template: spec: volumes: - name: disk-yellow-chipmunk-18 persistentVolumeClaim: claimName: disk-1 2. PVC/disk-1 is Filesystem 3. Use Storage Live Migration to move it to Block
Actual results:
Fails in MTC before the VM migration is triggered
{"level":"info","ts":1771723691.2272615,"logger":"directvolume","msg":"Phase execution failed.","phase":"CreateRsyncTransferPods","phaseDescription":"Creating Rsync daemon pods on the target cluster","error":"source and destination must be the same type of volume"}
Additional info:
- Switching the VM to use a DV makes it all work.
- I think the problem is in this code
func isBlockOrVMDisk(pvc *v1.PersistentVolumeClaim) bool {
if pvc == nil {
return false
}
isBlock := pvc.Spec.VolumeMode != nil && *pvc.Spec.VolumeMode == v1.PersistentVolumeBlock
if !isBlock {
if v, ok := pvc.GetAnnotations()[kubeVirtAnnKey]; !ok || v != kubevirtContentType { <---- manual PVC disks don't have this annotation
return false
}
isBlock = true
}
return isBlock
}
A manually created/attached PVC disk to a VM will not have the cdi.kubevirt.io/storage.contentType annotation. Only disks created with DataVolumes will have that. But DataVolumes are not mandatory.
- is duplicated by
-
CNV-80398 Standalone PVC added as existing volume for VM is missing annotations
-
- ON_QA
-
- is related to
-
CNV-80508 Migration controller does not check for "cdi.kubevirt.io/storage.contentType: kubevirt"
-
- MODIFIED
-
- relates to
-
CNV-80398 Standalone PVC added as existing volume for VM is missing annotations
-
- ON_QA
-
- links to