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

DataMover: Backup partially fails for a namespace without PVC

    XMLWordPrintable

Details

    • False
    • Hide

      None

      Show
      None
    • False
    • oadp-velero-container-1.1.1-20
    • ToDo
    • Yes
    • 0
    • 0
    • Very Likely
    • 0
    • None
    • Unset
    • Unknown
    • Proposed

    Description

      Description of problem: Backup partially fails for a namespace without PVC.
       

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

      1.1.1-34, but happened before, not sure exactly when was introduced, yet it's a regression from 1.1.0

      How reproducible: 100%

       

      Steps to Reproduce:
      1. Create DataMover backup of an application namespace without PVC (stateless app)

      Actual results: Backup partially fails

      fails with error:

      time="2022-10-27T14:32:29Z" level=error msg="volumesnapshotclass.snapshot.storage.k8s.io \"empty-project-e2e-06c58ed2-5604-11ed-b663-902e163f806c-snapclass\" not found" backup=openshift-adp/empty-project-e2e-06c58ed2-5604-11ed-b663-902e163f806c logSource="/remote-source/velero/app/pkg/controller/backup_controller.go:675"

      looks like it assumes some volumesnapshot name for a volumesnapshot class or something.

       

      Expected results: Expected it not to fail, just skip the volume backup part as with any other type of backup (restic/native csi/vsl)

       

      Additional info:

      Backup CR:

      apiVersion: velero.io/v1
      kind: Backup
      metadata:
        annotations:
          velero.io/source-cluster-k8s-gitversion: v1.24.6+5157800
          velero.io/source-cluster-k8s-major-version: "1"
          velero.io/source-cluster-k8s-minor-version: "24"
        creationTimestamp: "2022-10-27T14:31:49Z"
        generation: 5
        labels:
          velero.io/storage-location: ts-dpa-1
        name: empty-project-e2e-06c58ed2-5604-11ed-b663-902e163f806c
        namespace: openshift-adp
        resourceVersion: "273953"
        uid: d3f4ee9f-fd35-404b-9d98-28f4847974fc
      spec:
        csiSnapshotTimeout: 10m0s
        defaultVolumesToRestic: false
        hooks: {}
        includedNamespaces:
        - empty-project-ns
        metadata: {}
        storageLocation: ts-dpa-1
        ttl: 720h0m0s
      status:
        completionTimestamp: "2022-10-27T14:32:29Z"
        errors: 1
        expiration: "2022-11-26T14:31:49Z"
        formatVersion: 1.1.0
        phase: PartiallyFailed
        progress:
          itemsBackedUp: 20
          totalItems: 20
        startTimestamp: "2022-10-27T14:31:53Z"
        version: 1
       

      vsclass:

      [mperetz@fedora oadp-qe-automation]$ oc get vsclass  -o yaml
      apiVersion: v1
      items:
      - apiVersion: snapshot.storage.k8s.io/v1
        deletionPolicy: Delete
        driver: ebs.csi.aws.com
        kind: VolumeSnapshotClass
        metadata:
          creationTimestamp: "2022-10-27T07:45:47Z"
          generation: 1
          name: csi-aws-vsc
          resourceVersion: "56462"
          uid: 4b09cd06-d6d7-488e-8013-11475189be96
      - apiVersion: snapshot.storage.k8s.io/v1
        deletionPolicy: Retain
        driver: ebs.csi.aws.com
        kind: VolumeSnapshotClass
        metadata:
          annotations:
            snapshot.storage.kubernetes.io/is-default-class: "true"
          creationTimestamp: "2022-10-27T14:31:37Z"
          generation: 1
          labels:
            velero.io/csi-volumesnapshot-class: "true"
          name: example-snapclass
          resourceVersion: "273511"
          uid: 9cf63cba-dc66-411c-b073-38f17dabd1c6
      kind: List
      metadata:
        resourceVersion: ""
       

      DPA:

      [mperetz@fedora oadp-qe-automation]$ oc get dpa -n openshift-adp -o yaml
      apiVersion: v1
      items:
      - apiVersion: oadp.openshift.io/v1alpha1
        kind: DataProtectionApplication
        metadata:
          creationTimestamp: "2022-10-27T14:31:27Z"
          generation: 1
          name: ts-dpa
          namespace: openshift-adp
          resourceVersion: "273345"
          uid: 24ec902a-4269-4676-baa6-4f17e9f158c5
        spec:
          backupLocations:
          - velero:
              config:
                region: us-east-2
              credential:
                key: cloud
                name: cloud-credentials
              default: true
              objectStorage:
                bucket: oadpbucket150295
                prefix: velero-e2e-0497ea76-5604-11ed-b663-902e163f806c
              provider: aws
          configuration:
            restic:
              enable: true
              podConfig:
                resourceAllocations: {}
            velero:
              defaultPlugins:
              - openshift
              - aws
              - kubevirt
              - csi
          features:
            dataMover:
              enable: true
          podDnsConfig: {}
          snapshotLocations: []
        status:
          conditions:
          - lastTransitionTime: "2022-10-27T14:31:27Z"
            message: Reconcile complete
            reason: Complete
            status: "True"
            type: Reconciled
      kind: List
      metadata:
        resourceVersion: ""
       

      Attachments

        Activity

          People

            emcmulla@redhat.com Emily McMullan
            mperetz@redhat.com Maya Peretz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: