Uploaded image for project: 'OpenShift API for Data Protection'
  1. OpenShift API for Data Protection
  2. OADP-3053 Multiple BackupStorageLocations can be set as default
  3. OADP-3064

[IBM QE-P] Verify Bug OADP-3053 - Multiple BackupStorageLocations can be set as default

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • OADP 1.3.0
    • None
    • None
    • None
    • 4
    • False
    • Hide

      None

      Show
      None
    • False
    • ToDo
    • 0
    • 0.000
    • Very Likely
    • 0
    • None
    • Unset
    • Unknown

      Description of problem:

      We can create multiple BSL CR with default flag set to true. From the behaviour it seems backup_storage_location_controller is consider the last backup location it founds during the for loop as default.  Velero should allows to only set one default BSL at a time. 

      https://github.com/vmware-tanzu/velero/blob/main/pkg/controller/backup_storage_location_controller.go#L96

       

       

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

       

      How reproducible:
      Always

       

      Steps to Reproduce:
      1.  Create a DPA with multiple BSL location set as default.

      $ oc get dpa ts-dpa -o yaml
      apiVersion: oadp.openshift.io/v1alpha1
      kind: DataProtectionApplication
      metadata:
        creationTimestamp: "2023-11-07T06:52:46Z"
        generation: 6
        name: ts-dpa
        namespace: openshift-adp
        resourceVersion: "115621"
        uid: de65e475-24da-4152-819e-367099494ea6
      spec:
        backupLocations:
        - velero:
            config:
              insecureSkipTLSVerify: "true"
              profile: noobaa
              region: noobaa
              s3ForcePathStyle: "true"
              s3Url: http://s3-openshift-storage.apps.oadp-61240.qe.devcluster.openshift.com
            credential:
              key: cloud
              name: cloud-credentials
            default: true
            objectStorage:
              bucket: oadpbucket245076
              prefix: velero
            provider: aws
        - velero:
            config:
              insecureSkipTLSVerify: "true"
              profile: noobaa
              region: noobaa
              s3ForcePathStyle: "true"
              s3Url: http://s3-openshift-storage.apps.oadp-61240.qe.devcluster.openshift.com
            credential:
              key: cloud
              name: cloud-credentials
            default: true
            objectStorage:
              bucket: oadpbucket245076
              prefix: velero
            provider: aws
        configuration:
          nodeAgent:
            enable: true
            podConfig:
              resourceAllocations:
                limits:
                  cpu: 100m
                  memory: 50Mi
                requests:
                  cpu: 50m
                  memory: 10Mi
            uploaderType: kopia
          velero:
            defaultPlugins:
            - openshift
            - aws
            - csi

      Actual results:

      Mutiple backup locations can have default value set as true. 

      $ oc get bsl 
      NAME       PHASE       LAST VALIDATED   AGE     DEFAULT
      ts-dpa-1   Available   51s              3h23m   true
      ts-dpa-2   Available   21s              113m    true

      Expected results:

      BSL should have an error if multiple CR has default value set as true. 

      Additional info:

              sgarudi Sonia Garudi
              akarol@redhat.com Aziza Karol
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: