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

Velero backup.status.validationErrors field has multiple single quotes

XMLWordPrintable

    • 5
    • False
    • Hide

      None

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

      Description of problem:

      Create a backup with specifying a wrong backup storage location name. Single quotes are repeated twice in backup.status.ValidationErrors field. Attached backup yaml below.

        validationErrors:
        - 'an existing backup storage location wasn''t specified at backup creation time
          and the default ''ts-dpa-1'' wasn''t found. Please address this issue (see `velero
          backup-location -h` for options) and create a new backup. Error: BackupStorageLocation.velero.io
          "ts-dpa-1" not found'

       

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

       

      How reproducible:

      Always

       

      Steps to Reproduce:
      1. Create a backup specifying wrong backup storage location.

       

      $ oc get backup test-schedule-20231031071425 -o yaml
      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        name: test-schedule-20231031071425
        namespace: openshift-adp
      spec:
        includedNamespaces:
        - ocp-mysql
        storageLocation: ts-dpa-1

      2. Verify the backup.status.ValidationError has multiple quotes near wasn't and dpa name. 

       

       

      Actual results:

      Single quotes are repeated twice in entire string. 

       

      $ oc get backup test-schedule-20231031071425 -o yaml
      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        annotations:
          velero.io/resource-timeout: 10m0s
          velero.io/source-cluster-k8s-gitversion: v1.26.9+636f2be
          velero.io/source-cluster-k8s-major-version: "1"
          velero.io/source-cluster-k8s-minor-version: "26"
        creationTimestamp: "2023-10-31T07:14:25Z"
        generation: 2
        labels:
          velero.io/schedule-name: test-schedule
          velero.io/storage-location: ts-dpa-1
        name: test-schedule-20231031071425
        namespace: openshift-adp
        resourceVersion: "82296"
        uid: c03bf3d3-7baf-4d55-a292-222eadc7e9a5
      spec:
        csiSnapshotTimeout: 10m0s
        defaultVolumesToFsBackup: false
        hooks: {}
        includedNamespaces:
        - ocp-mysql
        itemOperationTimeout: 4h0m0s
        metadata: {}
        snapshotMoveData: false
        storageLocation: ts-dpa-1
        ttl: 4h0m0s
      status:
        expiration: "2023-10-31T11:14:25Z"
        formatVersion: 1.1.0
        phase: FailedValidation
        validationErrors:
        - 'an existing backup storage location wasn''t specified at backup creation time
          and the default ''ts-dpa-1'' wasn''t found. Please address this issue (see `velero
          backup-location -h` for options) and create a new backup. Error: BackupStorageLocation.velero.io
          "ts-dpa-1" not found'
        version: 1

       

      Expected results:

      No additional single quotes should be in error message. 

       

      Additional info:

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

                Created:
                Updated:
                Resolved: