-
Bug
-
Resolution: Done
-
Normal
-
CNV v4.15.4, CNV v4.16.0
-
None
-
3
-
False
-
-
False
-
None
-
---
-
---
-
-
Storage Core Sprint 261
-
High
-
None
Description of problem:
While creating the export pod, the virt-controller is setting export pod's volumes.name as source PVC name. However, if the PVC name exceeds 63 characters, it will fail to create the exporter pod with error below:
E0829 09:55:27.210880 1 util.go:72] Pod "virt-export-snapshot-beige-gorilla-84-clone-0qaom1" is invalid: [spec.volumes[1].name: Invalid value: "restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34": must be no more than 63 characters, spec.containers[0].volumeDevices[1].name: Not found: "restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34"]
Version-Release number of selected component (if applicable):
OpenShift Virtualization 4.15.4
How reproducible:
100 %
Steps to Reproduce:
The PVC name's length can increase when the VM goes through the following process:
1. Created a snapshot of a VM having below disk:
oc get vm rhel7-fuchsia-meadowlark-92 -o yaml |yq '.spec.template.spec.volumes[2]'
dataVolume:
name: rhel7-fuchsia-meadowlark-92-disk-aquamarine-roundworm-34
name: disk-aquamarine-roundworm-34
2. Cloned a new VM using this snapshot from UI. New PVC is having more than 63 characters:
# oc get vm snapshot-beige-gorilla-84-clone-0qaom1 -o yaml |yq '.spec.template.spec.volumes[2]'
dataVolume:
name: restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34
name: disk-aquamarine-roundworm-34
# oc get pvc|grep restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34
restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34 Bound pvc-1d58895e-213d-4f28-8fb8-97811ef329c1 30Gi RWX ocs-external-storagecluster-ceph-rbd 41m
3. Created a vmexport for the cloned VM. Pod creation failed with error below:
E0829 09:55:27.210880 1 util.go:72] Pod "virt-export-snapshot-beige-gorilla-84-clone-0qaom1" is invalid: [spec.volumes[1].name: Invalid value: "restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34": must be no more than 63 characters, spec.containers[0].volumeDevices[1].name: Not found: "restore-eb8c988d-a217-4c16-88e4-cdecc5f68166-disk-aquamarine-roundworm-34"]
Actual results:
VirtualMachineExport fails to create the export pod if the PVC name exceeds 63 characters
Expected results:
Export should work for the PVC having more than 63 characters.
Additional info:
- duplicates
-
CNV-47008 VirtualMachineExports with long names breaks VMExportController's ability to apply export service and pod
- ON_QA