Uploaded image for project: 'OpenShift API for Data Protection'
  1. OpenShift API for Data Protection
  2. OADP-5171

BSL status.message field shouldn't have the http response as output when bucket doesn't exist

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • OADP 1.5.0
    • OADP 1.3.1, OADP 1.4.1
    • velero
    • 3
    • False
    • Hide

      None

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

      Description of problem:

      Created a dpa with non existing bucket. Status field is returning an http response instead of a simple text bucket doesn't exist.  This issue only happens in case of Azure BSL. 

       

      Opened an upstream issue for the same:- 
      https://github.com/vmware-tanzu/velero/issues/8368

       

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

       

      How reproducible:
      Always

       

      Steps to Reproduce:
      1. Create cloud credentials secret

      2. Create a dpa with a non existing bucket

      $ cat dpa-azure.yaml 
      apiVersion: oadp.openshift.io/v1alpha1
      kind: DataProtectionApplication
      metadata:
        name: ts-dpa
        namespace: openshift-adp
      spec:
        configuration:
          velero:
            defaultPlugins:
              - azure
              - openshift 
        backupLocations:
        - name: test
          velero:
            config:
              resourceGroup: oadp-100711-zl59k-rg
              storageAccount: oadp100711zl59k
              subscriptionId: 53b8f551-f0fc-4bea-8cba-6d1fefd54c8a
              storageAccountKeyEnvVar: AZURE_STORAGE_ACCOUNT_ACCESS_KEY
            credential:
              key: cloud
              name: cloud-credentials-azure
            provider: azure
            default: true
            objectStorage:
              bucket: oadp100711zl59k1
              prefix: velero

      Actual results:

       

      BSL status.Message field has http response as output. 

      $ oc get bsl test -o yaml
      apiVersion: velero.io/v1
      kind: BackupStorageLocation
      metadata:
        creationTimestamp: "2024-11-04T08:42:12Z"
        generation: 411
        labels:
          app.kubernetes.io/component: bsl
          app.kubernetes.io/instance: test
          app.kubernetes.io/managed-by: oadp-operator
          app.kubernetes.io/name: oadp-operator-velero
          openshift.io/oadp: "True"
          openshift.io/oadp-registry: "True"
        name: test
        namespace: openshift-adp
        ownerReferences:
        - apiVersion: oadp.openshift.io/v1alpha1
          blockOwnerDeletion: true
          controller: true
          kind: DataProtectionApplication
          name: ts-dpa
          uid: 2ea57ddc-82bd-4131-a124-b0370d6f96f9
        resourceVersion: "114647"
        uid: 23759d8f-1d1d-496a-9882-c44ee56f3cc4
      spec:
        config:
          resourceGroup: oadp-100711-zl59k-rg
          storageAccount: oadp100711zl59k
          storageAccountKeyEnvVar: AZURE_STORAGE_ACCOUNT_ACCESS_KEY
          subscriptionId: 53b8f551-f0fc-4bea-8cba-6d1fefd54c8a
        credential:
          key: cloud
          name: cloud-credentials-azure
        default: true
        objectStorage:
          bucket: oadp100711zl59k1
          prefix: velero
        provider: azure
      status:
        lastSyncedTime: "2024-11-04T12:22:36Z"
        lastValidationTime: "2024-11-04T12:23:04Z"
        message: "BackupStorageLocation \"test\" is unavailable: rpc error: code = Unknown
          desc = GET https://oadp100711zl59k.blob.core.windows.net/oadp100711zl59k1\n--------------------------------------------------------------------------------\nRESPONSE
          404: 404 The specified container does not exist.\nERROR CODE: ContainerNotFound\n--------------------------------------------------------------------------------\n\uFEFF<?xml
          version=\"1.0\" encoding=\"utf-8\"?><Error><Code>ContainerNotFound</Code><Message>The
          specified container does not exist.\nRequestId:63cf34d8-801e-0078-09b4-2e4682000000\nTime:2024-11-04T12:23:04.5623627Z</Message></Error>\n--------------------------------------------------------------------------------\n"
        phase: Unavailable

       

      Expected results:

      Status.Message field shouldn't be an http response. 

       

      Additional info:

              spampatt@redhat.com Shubham Pampattiwar
              rhn-support-prajoshi Prasad Joshi
              Prasad Joshi Prasad Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: