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

Backup is marked as Completed even if Backup spec shows error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • OADP 1.2.5
    • None
    • velero
    • False
    • Hide

      None

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

      Description of problem:

      In OADP 1.2.3 Volsync DataMover feature, when we deploy 2 applications and during backup WaitingForPluginOperation phase, we delete one application, although backup spec shows error and backupItemOperations gets Failed for the deleted application, the backup still get's marked as completed.

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

      1.2.3-Red Hat build

      How reproducible:

      100% Reproducible

      Steps to Reproduce:

      1. Create Restic secret 

      apiVersion: v1
      kind: Secret
      metadata:
        name: dm-credential
        namespace: openshift-adp
      type: Opaque
      stringData:
        RESTIC_PASSWORD: my-secure-restic-password
      ~                                                

      2. Create VolumeSnapshtClass according to the CSI driver

      apiVersion: snapshot.storage.k8s.io/v1
      deletionPolicy: Retain
      driver: openshift-storage.rbd.csi.ceph.com
      kind: VolumeSnapshotClass
      metadata:
        name: ocs-storagecluster-rbdplugin-velero
        labels:
          velero.io/csi-volumesnapshot-class: 'true'
        annotations:
          snapshot.storage.kubernetes.io/is-default-class: 'true'
      parameters:
        clusterID: openshift-storage
        csi.storage.k8s.io/snapshotter-secret-name: rook-csi-rbd-provisioner
        csi.storage.k8s.io/snapshotter-secret-namespace: openshift-storage 

      2. Create DPA with volsync datamover feature enable.

       

      apiVersion: oadp.openshift.io/v1alpha1
      kind: DataProtectionApplication
      metadata:
        name: ts-dpa
        namespace: openshift-adp
      spec:
        configuration:
          velero:
            defaultPlugins:
              - openshift
              - aws
              - csi
              - vsm
        features:
          dataMover:
            enable: true
        backupLocations:
          - velero:
              config:
                profile: noobaa
                region: noobaa
                s3Url: <s3 url>
                insecureSkipTLSVerify: "true"
                s3ForcePathStyle: "true"
              credential:
                key: cloud
                name: cloud-credentials
              default: true
              objectStorage:
                bucket: <bucket name>
                prefix: velero
              provider: aws  

      2. Deploy ocp-8pvc-app in one namespace and ocp-mysql on other namespace.
      3. Execute backup including both the namespaces

       

       

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        name: backup
        labels:
          velero.io/storage-location: default
        namespace: openshift-adp
      spec:
        hooks: {}
        includedNamespaces:
        - ocp-mysql
        - ocp-8pvc-app
        snapshotMoveData: true
        storageLocation: ts-dpa-1
        ttl: 720h0m0s                

      4. When the backup is in WaitingForPluginOperation Phase, delete the mysql application

       

      Actual results:

      [aaraj@aaraj-thinkpadt14sgen1 oadp-e2e-qe]$  oc get backup -o yaml -n openshift-adp
      apiVersion: velero.io/v1
        kind: Backup
        metadata:
          annotations:
            velero.io/source-cluster-k8s-gitversion: v1.27.10+28ed2d7
            velero.io/source-cluster-k8s-major-version: "1"
            velero.io/source-cluster-k8s-minor-version: "27"
          creationTimestamp: "2024-02-05T05:38:18Z"
          generation: 8
          labels:
            velero.io/storage-location: ts-dpa-1
          name: mysql-9645f0bc-c3e8-11ee-9211-0a58ac1f0b7c
          namespace: openshift-adp
          resourceVersion: "67295"
          uid: d67d85d1-1b0e-4e9f-a8ab-1fbd41acb1bd
        spec:
          csiSnapshotTimeout: 10m0s
          defaultVolumesToFsBackup: false
          hooks: {}
          includedNamespaces:
          - test-oadp-284-1
          - test-oadp-284-2
          itemOperationTimeout: 1h0m0s
          metadata: {}
          storageLocation: ts-dpa-1
          ttl: 720h0m0s
        status:
          backupItemOperationsAttempted: 10
          backupItemOperationsCompleted: 8
          backupItemOperationsFailed: 2
          completionTimestamp: "2024-02-05T05:40:13Z"
          csiVolumeSnapshotsAttempted: 10
          csiVolumeSnapshotsCompleted: 10
          errors: 2
          expiration: "2024-03-06T05:38:18Z"
          formatVersion: 1.1.0
          phase: Completed
          startTimestamp: "2024-02-05T05:38:19Z"
          version: 1 

      Expected results:

      Backup should be partiallyFailed.

      Additional info:

            wnstb Wes Hayutin
            rh-ee-aaraj Aadarsh Raj
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: