-
Bug
-
Resolution: Done-Errata
-
Blocker
-
OADP 1.5.0
-
Quality / Stability / Reliability
-
3
-
False
-
-
False
-
oadp-operator-bundle-container-1.5.0-94
-
ToDo
-
-
-
Very Likely
-
0
-
0
-
None
-
Unset
-
Unknown
-
None
Description of problem:
I noticed an issue while testing the CSI snapshot backup and restore with self service feature. The volumeSnapshotContents are not getting restored when the includedNamesapces field is used in restoreSpec.
Version-Release number of selected component (if applicable):
OCP 4.19
How reproducible:
Always
Steps to Reproduce:
1. Deploy a stateful application consisting PVs
2. Trigger a CSI backup of namespace
oc get backup ocp-mysql-test-nab-609e4fa1-78ab-4f14-a13e-9015d69b0861 -o yaml -n openshift-adp apiVersion: velero.io/v1 kind: Backup metadata: annotations: openshift.io/oadp-nab-origin-name: test-nab openshift.io/oadp-nab-origin-namespace: ocp-mysql velero.io/resource-timeout: 10m0s velero.io/source-cluster-k8s-gitversion: v1.32.3 velero.io/source-cluster-k8s-major-version: "1" velero.io/source-cluster-k8s-minor-version: "32" creationTimestamp: "2025-04-10T10:34:47Z" generation: 8 labels: app.kubernetes.io/managed-by: oadp-nac-controller openshift.io/oadp: "True" openshift.io/oadp-nab-origin-nacuuid: ocp-mysql-test-nab-609e4fa1-78ab-4f14-a13e-9015d69b0861 velero.io/storage-location: ts-dpa-1 name: ocp-mysql-test-nab-609e4fa1-78ab-4f14-a13e-9015d69b0861 namespace: openshift-adp resourceVersion: "100899" uid: 36de9677-138a-48dc-9720-1363da5dfec5 spec: csiSnapshotTimeout: 10m0s defaultVolumesToFsBackup: false excludedResources: - nonadminbackups - nonadminrestores - nonadminbackupstoragelocations - securitycontextconstraints - clusterroles - clusterrolebindings - priorityclasses - customresourcedefinitions - virtualmachineclusterinstancetypes - virtualmachineclusterpreferences hooks: {} includedNamespaces: - ocp-mysql itemOperationTimeout: 4h0m0s metadata: {} snapshotMoveData: false storageLocation: ts-dpa-1 ttl: 720h0m0s status: backupItemOperationsAttempted: 2 backupItemOperationsCompleted: 2 completionTimestamp: "2025-04-10T10:35:35Z" csiVolumeSnapshotsAttempted: 2 csiVolumeSnapshotsCompleted: 2 expiration: "2025-05-10T10:34:47Z" formatVersion: 1.1.0 hookStatus: {} phase: Completed progress: itemsBackedUp: 50 totalItems: 50 startTimestamp: "2025-04-10T10:34:47Z" version: 1
3. Delete app namespace and trigger restore with includedNamespace field.
apiVersion: velero.io/v1 kind: Restore metadata: name: test-restore1 namespace: openshift-adp spec: backupName: ocp-mysql-test-nab-609e4fa1-78ab-4f14-a13e-9015d69b0861 includedNamespaces: - ocp-mysql
Actual results:
Restore got completed successfully but no VolumesnapshotContents are created and the PVCs are in pending status.
$ oc get pod NAME READY STATUS RESTARTS AGE mysql-64c9d6466-5s2cc 0/1 Pending 0 7m32s
$ oc get pvc NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE mysql-data Pending standard-csi <unset> 7m59s mysql-data1 Pending standard-csi <unset> 7m59s
$ oc get vs 305b539eb51418c0627dd884565ef95ad0d9cc6a537f43a922a341d321f6cd51 -o yaml apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: annotations: velero.io/csi-driver-name: pd.csi.storage.gke.io velero.io/csi-volumesnapshot-handle: projects/openshift-qe/global/snapshots/snapshot-0df54e8a-71c1-4167-b42e-b964953e1dd6 velero.io/csi-volumesnapshot-restore-size: 2Gi velero.io/csi-vsc-deletion-policy: Retain creationTimestamp: "2025-04-10T10:56:42Z" finalizers: - snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection - snapshot.storage.kubernetes.io/volumesnapshot-bound-protection generation: 1 labels: app: mysql testlabel: selectors testlabel2: foo velero.io/backup-name: ocp-mysql-test-nab-609e4fa1-78ab-4f14-a13e-9015d69b0861 velero.io/restore-name: test-restore1 name: 305b539eb51418c0627dd884565ef95ad0d9cc6a537f43a922a341d321f6cd51 namespace: ocp-mysql resourceVersion: "106673" uid: 57739b1c-5484-4bf5-803a-5b785bd9102e spec: source: volumeSnapshotContentName: 305b539eb51418c0627dd884565ef95ad0d9cc6a537f43a922a341d321f6cd51 volumeSnapshotClassName: csi-gce-pd-vsc status: error: message: VolumeSnapshotContent is missing time: "2025-04-10T10:56:42Z" readyToUse: false
Expected results:
Application pod should be in running state after restore.
Additional info:
It works fine without adding includedNamespaces field in restore spec.
- depends on
-
OADP-5608 Restoring a VirtualMachineInstance using a label selector is successful but vm provisioning fails because VM's Data-volumes are excluded for the restore's graph (addVolumeGraph)
-
- Closed
-
-
OADP-5880 Allow Restore Filtering
-
- Closed
-
-
OADP-6238 Allow Restore Filtering - push oadp fix upstream
-
- Closed
-
- links to
-
RHEA-2025:145537 OpenShift API for Data Protection (OADP) 1.5