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

Controller pod crashes when (decrypted) Azure Secret value has empty key-value pair

XMLWordPrintable

    • 10
    • False
    • Hide

      None

      Show
      None
    • False
    • oadp-operator-bundle-container-1.3.4-13
    • ToDo
    • 0
    • 0.000
    • Very Likely
    • 0
    • None
    • Unset
    • Unknown
    • No

      Description of problem:

      When the azure secret decrypted value has any empty value for AZURE key, DPA reconciles but the controller pod crashes while parsing it.

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

      OADP 1.3.1

      How reproducible:

      Always

      Steps to Reproduce:
      1. Create an azure secret
      $ oc create secret generic cloud-credentials-azure --from-file=cloud=credentials -n openshift-adp

      where credentials file look something like this (having an empty value for any key)

      AZURE_SUBSCRIPTION_ID=53aaa-8cba-6d1fefd54c8a
      AZURE_TENANT_ID=60a54e-dc3f6be6a7ee
      AZURE_CLIENT_ID=477795-37da3de3b31f
      AZURE_CLIENT_SECRET=
      AZURE_STORAGE_ACCOUNT_ACCESS_KEY=tb3VTlB/qT+GfHRnjbYfGux8//DuSVm/2RRKMKbS+ASt1HUqrQ==
      AZURE_RESOURCE_GROUP=oadpxc7ss-rg
      AZURE_CLOUD_NAME=AzurePublicCloud
      

      2. Create a DPA using the credential created above

      $ oc get dpa -o yaml
      apiVersion: v1
      items:
      - apiVersion: oadp.openshift.io/v1alpha1
        kind: DataProtectionApplication
        metadata:
          creationTimestamp: "2024-02-21T07:11:06Z"
          generation: 8
          name: ts-dpa
          namespace: openshift-adp
          resourceVersion: "49487"
          uid: 95be05df-e5e4-4493-8da8-11345c18fe13
        spec:
          backupLocations:
          - velero:
              config:
                resourceGroup: oadp-71420-xc7ss-rg
                storageAccount: oadp71420xc7ss
                storageAccountKeyEnvVar: AZURE_STORAGE_ACCOUNT_ACCESS_KEY
                subscriptionId: 53b8f551-f0fc-4bea-8cba-6d1fefd54c8a
              credential:
                key: cloud
                name: cloud-credentials-azure
              default: true
              objectStorage:
                bucket: oadp71420xc7ss
                prefix: velero
              provider: azure
          configuration:
            nodeAgent:
              enable: true
              uploaderType: kopia
            velero:
              defaultPlugins:
              - openshift
              - csi
              - azure
      

      Actual results:

      Controller pod crashes with below error:

      1.7085010483661158e+09	INFO	Observed a panic in reconciler: odd number of arguments passed as key-value pairs for logging	{"controller": "dataprotectionapplication", "controllerGroup": "oadp.openshift.io", "controllerKind": "DataProtectionApplication", "dataProtectionApplication": {"name":"ts-dpa","namespace":"openshift-adp"}, "namespace": "openshift-adp", "name": "ts-dpa", "reconcileID": "22dafa9f-0240-4860-89d1-360824b70acc"}
      panic: odd number of arguments passed as key-value pairs for logging [recovered]
      	panic: odd number of arguments passed as key-value pairs for logging
      

      Expected results:

      Should not panic

      Additional info:

              rhn-support-ssingla Sachin Singla
              rhn-support-ssingla Sachin Singla
              Prasad Joshi Prasad Joshi
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: