Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PrasadJoshi12 opened this issue Nov 4, 2024 · 1 comment

Comments

@PrasadJoshi12
Copy link

PrasadJoshi12 commented Nov 4, 2024

What steps did you take and what happened:

Created a BSL with non existing bucket on azure platform. I noticed status.Message field has http response as output. This issue doesn't happen in case of GCP and AWS. Attached details below:-

$ 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: <resource group>
    storageAccount: oadp100711zl59k
    storageAccountKeyEnvVar: AZURE_STORAGE_ACCOUNT_ACCESS_KEY
    subscriptionId: <subscription>
  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

What did you expect to happen:

Status.Message shouldn't have the http response as output.

The following information will help us better understand what's going on:

If you are using velero v1.7.0+:
Please use velero debug --backup <backupname> --restore <restorename> to generate the support bundle, and attach to this issue, more options please refer to velero debug --help

If you are using earlier versions:
Please provide the output of the following commands (Pasting long output into a GitHub gist or other pastebin is fine.)

  • kubectl logs deployment/velero -n velero
  • velero backup describe <backupname> or kubectl get backup/<backupname> -n velero -o yaml
  • velero backup logs <backupname>
  • velero restore describe <restorename> or kubectl get restore/<restorename> -n velero -o yaml
  • velero restore logs <restorename>

Anything else you would like to add:

Environment:

  • Velero version (use velero version): velero 1.14
  • Velero features (use velero client config get features):
  • Kubernetes version (use kubectl version): v1.29.9+5865c5b
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

  • 👍 for "I would like to see this bug fixed as soon as possible"
  • 👎 for "There are more important bugs to focus on right now"
@kaovilai
Copy link
Contributor

kaovilai commented Nov 4, 2024

The ask is for the bucket not exist error to be parsed then reported in a prettier way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants