Add warning message for volume snapshotter in data mover case.

Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
Xun Jiang
2023-06-09 20:55:00 +08:00
parent aed8c8ec1b
commit a5c28ad423
3 changed files with 9 additions and 1 deletions

View File

@@ -480,6 +480,13 @@ func (ib *itemBackupper) takePVSnapshot(obj runtime.Unstructured, log logrus.Fie
return nil
}
// TODO: Snapshot data mover is only supported for CSI plugin scenario by now.
// Need to add a mechanism to choose running which plugin for resources.
// After that, this warning can be removed.
if boolptr.IsSetToTrue(ib.backupRequest.Spec.SnapshotMoveData) {
log.Warnf("VolumeSnapshotter plugin doesn't support data movement.")
}
if ib.backupRequest.ResPolicies != nil {
if action, err := ib.backupRequest.ResPolicies.GetMatchAction(pv); err != nil {
log.WithError(err).Errorf("Error getting matched resource policies for pv %s", pv.Name)