Full backup for all data movers (#10185)

* support full backup for fs data mover

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* full backup for PVB

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* full backup for all data movers

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

* fix UT error

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>

---------

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
lyndon-li
2026-08-18 13:08:41 +08:00
committed by GitHub
parent 6256b4fcb4
commit fa95eb0aa7
12 changed files with 55 additions and 27 deletions
+9 -9
View File
@@ -178,7 +178,7 @@ func (r *RestoreMicroService) RunCancelableDataPath(ctx context.Context) (string
}); err != nil {
return "", errors.Wrap(err, "error to initialize data path")
}
log.Info("fs init")
log.Info("Async br init")
if err := dp.StartRestore(dd.Spec.SnapshotID, r.sourceTargetPath, dd.Spec.DataMoverConfig, &datapath.RestoreStartParam{}); err != nil {
return "", errors.Wrap(err, "error starting data path restore")
@@ -190,7 +190,7 @@ func (r *RestoreMicroService) RunCancelableDataPath(ctx context.Context) (string
result := ""
select {
case <-ctx.Done():
err = errors.New("timed out waiting for fs restore to complete")
err = errors.New("timed out waiting for restore to complete")
break
case res := <-r.resultSignal:
err = res.err
@@ -199,7 +199,7 @@ func (r *RestoreMicroService) RunCancelableDataPath(ctx context.Context) (string
}
if err != nil {
log.WithError(err).Error("Async fs restore was not completed")
log.WithError(err).Error("Async restore was not completed")
}
r.eventRecorder.EndingEvent(dd, false, datapath.EventReasonStopped, "Data path for %s stopped", dd.Name)
@@ -272,9 +272,9 @@ func (r *RestoreMicroService) OnDataDownloadProgress(ctx context.Context, namesp
}
func (r *RestoreMicroService) closeDataPath(ctx context.Context, ddName string) {
fsRestore := r.dataPathMgr.GetAsyncBR(ddName)
if fsRestore != nil {
fsRestore.Close(ctx)
asyncBR := r.dataPathMgr.GetAsyncBR(ddName)
if asyncBR != nil {
asyncBR.Close(ctx)
}
r.dataPathMgr.RemoveAsyncBR(ddName)
@@ -285,11 +285,11 @@ func (r *RestoreMicroService) cancelDataDownload(dd *velerov2alpha1api.DataDownl
r.eventRecorder.Event(dd, false, datapath.EventReasonCancelling, "Canceling for data download %s", dd.Name)
fsBackup := r.dataPathMgr.GetAsyncBR(dd.Name)
if fsBackup == nil {
asyncBR := r.dataPathMgr.GetAsyncBR(dd.Name)
if asyncBR == nil {
r.OnDataDownloadCancelled(r.ctx, dd.GetNamespace(), dd.GetName())
r.eventRecorder.EndingEvent(dd, false, datapath.EventReasonStopped, "Data path for %s exited without start", dd.Name)
} else {
fsBackup.Cancel()
asyncBR.Cancel()
}
}