-
Bug
-
Resolution: Can't Do
-
Undefined
-
None
-
4.14.z
-
None
-
Important
-
None
-
False
-
Description of problem:
vsphere-syncer fullSync fails to push labels metadata, when PERSISTENT_VOLUME_CLAIM & POD EntityName are named the same As a result, the PVC labels are not pushed to vSAN and the CNS volume is created without the labels and difficults day-2 operations oriented at cleaning up orphaned volumes.
Version-Release number of selected component (if applicable):
4.14.z
How reproducible:
Always
Steps to Reproduce:
- Create a PERSISTENT_VOLUME_CLAIM [0] and POD [] EntityTypes, with the same EntityName
- Increase vSphere CSI driver log verbosity to `logLevel: Debug`
- Check the CSI driver vsphere-syncer container logs and the
[0]
EntityName: "bon0l01-test" EntityType: "PERSISTENT_VOLUME_CLAIM" Labels: - Key: "label.set/firstlabel" Value: "test-pvc-1" - Key: "label.set/fourthlabel" Value: "fourth-label-test" - Key: "label.set/secondlabel" Value: "second-label-test" - Key: "label.set/thirdlabel" Value: "third-label-test" ReferredEntity: - EntityType: "PERSISTENT_VOLUME" EntityName: "pvc-76cd70a4-da58-4e9d-8f76-b9dc2c3d7513"
[1]
EntityName: "bon0l01-test" EntityType: "POD" Labels: <> ReferredEntity: - EntityType: "PERSISTENT_VOLUME_CLAIM" EntityName: "bon0l01-test"
Actual results:
PERSISTENT_VOLUME_CLAIM labels are not pushed to vCenter, resulting in a non-labeled CNS volume
Expected results:
PERSISTENT_VOLUME_CLAIM labels to be pushed accordingly
Additional info:
buildCnsMetadataList() suggests [0] the CNS volume metadata would be built over "PV metadata, PVC metadata and POD metadata". However, when PERSISTENT_VOLUME_CLAIM and POD EntityTypes are created with the same EntityName, PVC labels are not pushed accordingly. [0] https://github.com/openshift/vmware-vsphere-csi-driver/blob/release-4.14/pkg/syncer/fullsync.go#L605-L639