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

cns-migration exits logic enhancement

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 4.18.0
    • premerge, 4.17
    • Storage / Operators
    • None
    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:
      There are two enhancements we could have for cns-migration:
      1. we can print the error message once the target datastore is not found, currently it exits as nothing did:

      sh-5.1$ /bin/cns-migration -kubeconfig /tmp/kubeconfig -source vsanDatastore -destination invalid -volume-file /tmp/pv.txt
      KubeConfig is: /tmp/kubeconfig
      I0806 07:59:34.884908     131 logger.go:28] logging successfully to vcenter
      I0806 07:59:36.078911     131 logger.go:28] ----------- Migration Summary ------------
      I0806 07:59:36.078944     131 logger.go:28] Migrated 0 volumes
      I0806 07:59:36.078960     131 logger.go:28] Failed to migrate 0 volumes
      I0806 07:59:36.078968     131 logger.go:28] Volumes not found 0    

      See the source datastore checing:

      sh-5.1$ /bin/cns-migration -kubeconfig /tmp/kubeconfig -source invalid -destination Datastorenfsdevqe -volume-file /tmp/pv.txt
      KubeConfig is: /tmp/kubeconfig
      I0806 08:02:08.719657     138 logger.go:28] logging successfully to vcenter
      E0806 08:02:08.749709     138 logger.go:10] error listing cns volumes: error finding datastore invalid in datacenter DEVQEdatacenter

       

       

      2. If we the volume-file has one invalid pv name which is not found like at the beginning, it exits immediately and all the remaining pvs are skips, we can let it continue to check other pvs.

       

      Version-Release number of selected component (if applicable):

      4.17    

      How reproducible:

          Always

      Steps to Reproduce:

          See Description     

              hekumar@redhat.com Hemant Kumar
              wduan@redhat.com Wei Duan
              Wei Duan Wei Duan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: