Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-47689

vsphere-syncer fails to push PVC labels metadata, when PERSISTENT_VOLUME_CLAIM & POD EntityName are named the same

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Can't Do
    • Icon: Undefined Undefined
    • None
    • 4.14.z
    • Storage / Operators
    • None
    • Important
    • None
    • False
    • Hide

      None

      Show
      None

      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:

      1. Create a PERSISTENT_VOLUME_CLAIM [0] and POD [] EntityTypes, with the same EntityName
      2. Increase vSphere CSI driver log verbosity to `logLevel: Debug`
      3. 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

              rhn-engineering-jsafrane Jan Safranek
              rhn-support-rsandu Robert Sandu
              Wei Duan Wei Duan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: