Merge pull request #6377 from blackpiglet/add_warning_in_volume_snapshotter_for_data_mover

Add warning message for volume snapshotter in data mover case.
This commit is contained in:
Shubham Pampattiwar
2023-06-12 06:12:45 -07:00
committed by GitHub
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Add warning message for volume snapshotter in data mover case.
+7
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)
+1 -1
View File
@@ -27,7 +27,7 @@ type VolumeSnapshotClassBuilder struct {
}
// ForVolumeSnapshotClass is the constructor of VolumeSnapshotClassBuilder.
func (b *VolumeSnapshotClassBuilder) ForVolumeSnapshotClass(name string) *VolumeSnapshotClassBuilder {
func ForVolumeSnapshotClass(name string) *VolumeSnapshotClassBuilder {
return &VolumeSnapshotClassBuilder{
object: &snapshotv1api.VolumeSnapshotClass{
TypeMeta: metav1.TypeMeta{