-
Bug
-
Resolution: Not a Bug
-
Undefined
-
None
-
None
-
Quality / Stability / Reliability
-
0.42
-
False
-
-
False
-
None
-
-
CNV I/U Operators Sprint 278
-
None
Description of problem:
The test tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_custom_golden_images_namespace.py::TestDefaultCommonTemplates::test_boot_sources_not_reconciled_in_default_namespace is applying this configuration:
$ oc get hyperconvergeds.hco.kubevirt.io -n openshift-cnv kubevirt-hyperconverged -o yaml | yq .spec | grep common commonBootImageNamespace: custom-golden-images-namespace
and then removing the volumesnapshots one by one:
2025-10-03T08:41:16.468581 ocp_resources VolumeSnapshot INFO Delete VolumeSnapshot centos-stream10-3d2313c9045e 2025-10-03T08:41:16.549005 ocp_resources VolumeSnapshot INFO Deleting {'apiVersion': 'snapshot.storage.k8s.io/v1', 'kind': 'VolumeSnapshot', 'metadata': {'annotations': {'cdi.kubevirt.io/storage.import.lastUseTime': '2025-10-03T12:15:12.8101079Z', 'cdi.kubevirt.io/storage .import.sourceVolumeMode': 'Filesystem'}, 'creationTimestamp': '2025-10-03T08:49:19Z', 'finalizers': ['snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection', 'snapshot.storage.kubernetes.io/volumesnapshot-bound-protection'], 'generation': 1, 'labels': {'app' : 'containerized-data-importer', 'app.kubernetes.io/component': 'storage', 'app.kubernetes.io/managed-by': 'cdi-controller', 'app.kubernetes.io/part-of': 'hyperconverged-cluster', 'app.kubernetes.io/version': '4.20.0', 'cdi.kubevirt.io': '', 'cdi.kubevirt.io/dataImportCro n': 'centos-stream10-image-cron', 'instancetype.kubevirt.io/default-instancetype': 'u1.medium', 'instancetype.kubevirt.io/default-preference': 'centos.stream10', 'kubevirt.io/dynamic-credentials-support': 'true'}, 'managedFields': [{'apiVersion': 'snapshot.storage.k8s.io/ v1', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:metadata': {'f:finalizers': {'.': {}, 'v:"snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection"': {}, 'v:"snapshot.storage.kubernetes.io/volumesnapshot-bound-protection"': {}}}}, 'manager': 'snapshot-controller' , 'operation': 'Update', 'time': '2025-10-03T08:49:19Z'}, {'apiVersion': 'snapshot.storage.k8s.io/v1', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:status': {'.': {}, 'f:boundVolumeSnapshotContentName': {}, 'f:creationTime': {}, 'f:readyToUse': {}, 'f:restoreSize': {}}}, 'ma nager': 'snapshot-controller', 'operation': 'Update', 'subresource': 'status', 'time': '2025-10-03T08:49:59Z'}, {'apiVersion': 'snapshot.storage.k8s.io/v1', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:metadata': {'f:annotations': {'.': {}, 'f:cdi.kubevirt.io/storage.import. lastUseTime': {}, 'f:cdi.kubevirt.io/storage.import.sourceVolumeMode': {}}, 'f:labels': {'.': {}, 'f:app': {}, 'f:app.kubernetes.io/component': {}, 'f:app.kubernetes.io/managed-by': {}, 'f:app.kubernetes.io/part-of': {}, 'f:app.kubernetes.io/version': {}, 'f:cdi.kubevirt. io': {}, 'f:cdi.kubevirt.io/dataImportCron': {}, 'f:instancetype.kubevirt.io/default-instancetype': {}, 'f:instancetype.kubevirt.io/default-preference': {}, 'f:kubevirt.io/dynamic-credentials-support': {}}}, 'f:spec': {'.': {}, 'f:source': {'.': {}, 'f:persistentVolumeCla imName': {}}, 'f:volumeSnapshotClassName': {}}}, 'manager': 'virt-cdi-controller', 'operation': 'Update', 'time': '2025-10-03T12:15:12Z'}], 'name': 'centos-stream10-3d2313c9045e', 'namespace': 'openshift-virtualization-os-images', 'resourceVersion': '31324980', 'uid': '85 047050-3e57-4201-a54e-e72a8136d7ce'}, 'spec': {'source': {'persistentVolumeClaimName': 'centos-stream10-3d2313c9045e'}, 'volumeSnapshotClassName': 'gcnv-csi-snapclass'}, 'status': {'boundVolumeSnapshotContentName': 'snapcontent-85047050-3e57-4201-a54e-e72a8136d7ce', 'crea tionTime': '2025-10-03T08:49:59Z', 'readyToUse': True, 'restoreSize': '34144990004'}}
and the recreation of them should use the new namespace, but it is not:
$ oc get volumesnapshot -A
NAMESPACE NAME READYTOUSE SOURCEPVC SOURCESNAPSHOTCONTENT RESTORESIZE SNAPSHOTCLASS SNAPSHOTCONTENT CREATIONTIME AGE
openshift-virtualization-os-images centos-stream10-3d2313c9045e true centos-stream10-3d2313c9045e 34144990004 gcnv-csi-snapclass snapcontent-67aa55f7-9c1c-4d0c-b679-55140a7805ec 55s 2m5s
Therefore, the testcase is failing:
2025-10-03T08:45:56.710578 tests.install_upgrade_operators.hco_enablement_golden_image_updates.test_custom_golden_images_namespace ERROR resources shouldn't reconcile in openshift-virtualization-os-images namespace
Same testcase is working perfectly fine on PSI cluster using snapshotClass ocs-storagecluster-rbdplugin-snapclass.
Checking the cdi-deployment pod, the configuration is not reaching it:
$ oc logs -n openshift-cnv -l cdi.kubevirt.io=cdi-deployment | grep custom-golden-images-namespace $
However, on the PSI cluster, it is:
$ oc logs -n openshift-cnv -l cdi.kubevirt.io=cdi-deployment | grep custom-golden-images-namespace {"level":"debug","ts":"2025-10-03T12:34:57Z","logger":"controller.import-populator","msg":"reconciling Import Source PVCs","PVC":{"name":"rhel8-684cedbd2c18","namespace":"custom-golden-images-namespace"}} {"level":"debug","ts":"2025-10-03T12:34:57Z","logger":"controller.import-controller","msg":"reconciling Import PVCs","PVC":{"name":"rhel8-684cedbd2c18","namespace":"custom-golden-images-namespace"}} {"level":"debug","ts":"2025-10-03T12:34:57Z","logger":"controller.upload-controller","msg":"reconciling Upload PVCs","PVC":{"name":"rhel8-684cedbd2c18","namespace":"custom-golden-images-namespace"}}
Version-Release number of selected component (if applicable):
cnv-4.20-0 on top of OCP4.20.0-ec.6 on GCP
How reproducible:
Always
Steps to Reproduce:
1. Create the namespace 2. Edit HCO to change the param commonBootImageNamespace 3. Delete one volumesnapshot and wait it is recreated in the new namespace
Actual results:
The volumesnapshot is created in the default namespace and not in the new one.
Expected results:
It should be created in the new one.
Additional info:
must-gather linked on private comment.
- is triggered by
-
CNV-38937 [QE][HCO] run smoke, tier1 and tier2 on GCP with baremetal nodes
-
- In Progress
-