let uploader to control fallback centrally (#10523)

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
lyndon-li
2026-09-11 00:34:13 -04:00
committed by GitHub
parent 3df8ef0567
commit 34a9f500cc
3 changed files with 3 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
Don't change restoreType from plugin, let uploader to control fallback centrally
+1 -2
View File
@@ -247,8 +247,7 @@ func (p *pvcRestoreItemAction) executeWithDataMove(logger *logrus.Entry, input *
logger.Info("ExistingVolumeDataPolicy is in-place incremental restore and data mover is velero-block. Taking a CSI snapshot of the existing PVC as the baseline of CBT...")
volumeSnapshot, err = p.createVolumeSnapshot(ctx, logger, input.Restore, *existingPVC, dataUploadResult.SnapshotClass, backup.Spec.CSISnapshotTimeout.Duration)
if err != nil {
logger.Warnf("fail to create VolumeSnapshot for existing PVC %s/%s: %s, fallback to in-place full restore", existingPVC.Namespace, existingPVC.Name, err.Error())
restoreType = velerov1api.VolumeDataPolicyTypeFull
logger.Warnf("Fail to create VolumeSnapshot for existing PVC %s/%s: %s, incremental restore will be suppressed", existingPVC.Namespace, existingPVC.Name, err.Error())
} else {
defer func() {
if err != nil {
+1 -1
View File
@@ -528,7 +528,7 @@ func TestExecute(t *testing.T) {
ObjectMeta(builder.WithOwnerReference([]metav1.OwnerReference{{APIVersion: velerov1api.SchemeGroupVersion.String(), Kind: "Restore", Name: "testRestore", UID: "uid", Controller: boolptr.True()}}),
builder.WithLabelsMap(map[string]string{velerov1api.AsyncOperationIDLabel: "dd-uid.", velerov1api.RestoreNameLabel: "testRestore", velerov1api.RestoreUIDLabel: "uid"}),
builder.WithGenerateName("testRestore-")).Result()
d.Spec.RestoreType = "full"
d.Spec.RestoreType = "incremental"
d.Spec.DataMover = "velero-block"
return d
}(),