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
+10 -10
View File
@@ -184,7 +184,7 @@ func (r *BackupMicroService) RunCancelableDataPath(ctx context.Context) (string,
return "", errors.Wrap(err, "error to create data path")
}
log.Debug("Async fs br created")
log.Debug("Async br created")
if err := dp.Init(ctx, &datapath.InitParam{
BSLName: du.Spec.BackupStorageLocation,
@@ -198,7 +198,7 @@ func (r *BackupMicroService) RunCancelableDataPath(ctx context.Context) (string,
return "", errors.Wrap(err, "error to initialize data path")
}
log.Info("Async fs br init")
log.Info("Async br init")
tags := map[string]string{
velerov1api.AsyncOperationIDLabel: du.Labels[velerov1api.AsyncOperationIDLabel],
@@ -207,7 +207,7 @@ func (r *BackupMicroService) RunCancelableDataPath(ctx context.Context) (string,
// Modify the ParentSnapshot to "" and ForceFull to true when ParentSnapshot is "none".
parentSnapshot := du.Spec.ParentSnapshot
forceFull := false
if du.Spec.ParentSnapshot == veleroshared.DataUploadParentSnapshotNone {
if du.Spec.ParentSnapshot == veleroshared.ParentSnapshotNone {
parentSnapshot = ""
forceFull = true
}
@@ -231,7 +231,7 @@ func (r *BackupMicroService) RunCancelableDataPath(ctx context.Context) (string,
result := ""
select {
case <-ctx.Done():
err = errors.New("timed out waiting for fs backup to complete")
err = errors.New("timed out waiting for backup to complete")
break
case res := <-r.resultSignal:
err = res.err
@@ -315,9 +315,9 @@ func (r *BackupMicroService) OnDataUploadProgress(ctx context.Context, namespace
}
func (r *BackupMicroService) closeDataPath(ctx context.Context, duName string) {
fsBackup := r.dataPathMgr.GetAsyncBR(duName)
if fsBackup != nil {
fsBackup.Close(ctx)
asyncBR := r.dataPathMgr.GetAsyncBR(duName)
if asyncBR != nil {
asyncBR.Close(ctx)
}
r.dataPathMgr.RemoveAsyncBR(duName)
@@ -328,11 +328,11 @@ func (r *BackupMicroService) cancelDataUpload(du *velerov2alpha1api.DataUpload)
r.eventRecorder.Event(du, false, datapath.EventReasonCancelling, "Canceling for data upload %s", du.Name)
fsBackup := r.dataPathMgr.GetAsyncBR(du.Name)
if fsBackup == nil {
asyncBR := r.dataPathMgr.GetAsyncBR(du.Name)
if asyncBR == nil {
r.OnDataUploadCancelled(r.ctx, du.GetNamespace(), du.GetName())
r.eventRecorder.EndingEvent(du, false, datapath.EventReasonStopped, "Data path for %s exited without start", du.Name)
} else {
fsBackup.Cancel()
asyncBR.Cancel()
}
}