-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
-
False
-
Passed
-
0
-
0
-
Very Likely
-
0
-
Customer Escalated, Customer Facing
-
None
-
Unset
-
Unknown
-
No
Description of problem:
If a csi/datamover backup is created with `includedNamespaces` and `inCludedResource` only specifying PVs alongside labelSelector as a criteria then the backups fails.
How reproducible:
100%
Steps to Reproduce:
Create backup with the above specifications, sample CR is as follows:
```
apiVersion: velero.io/v1
kind: Backup
metadata:
name: cluster-pvcs
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToRestic: false
includedNamespaces:
- '*'
includedResources: - PersistentVolumeClaim
labelSelector:
matchLabels:
oadp-backup: 'true'
storageLocation: openshift-backups-1
ttl: 24h0m0s
```Actual results:
In case of datamover no VSB created
In case of csi, partial execution of plugin resulting in backup failure
Expected results:
CSI/datamover backup to complete successfully
Additional Info:
So what happens is that the labelSelector is only used as a filtering criteria when collecting items to be backedup and not when we create and add additional Items in our csi/datamover plugin runtime execution. Only includes/Excludes is used as a criteria when executing resource specific plugins, hence the additional resources in the includes list which will enable proper execution of csi/datamover resource based plugins in the backup runtime.
Backup CR which works after additional resources being specified:
```
apiVersion: velero.io/v1
kind: Backup
metadata:
name: cluster-pvcs
namespace: openshift-adp
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToRestic: false
includedNamespaces:
- '*'
includedResources: - PersistentVolumeClaim
- VolumeSnapshots
- VolumeSnapshotContents
- PersistentVolumes
- VolumeSnapshotBackups
labelSelector:
matchLabels:
oadp-backup: 'true'
storageLocation: openshift-backups-1
ttl: 24h0m0s
```
- mentioned on