fix issue 6571

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
pull/6594/head
Lyndon-Li 2023-08-03 12:31:34 +08:00
parent bb96c2155c
commit 69bc84cf0c
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
Fix issue #6571, fix the problem for restore item operation to set the errors correctly so that they can be recorded by Velero restore and then reflect the correct status for Velero restore.

View File

@ -535,8 +535,8 @@ func (r *restoreReconciler) runValidatedRestore(restore *api.Restore, info backu
// Completed yet.
inProgressOperations, _, opsCompleted, opsFailed, errs := getRestoreItemOperationProgress(restoreReq.Restore, pluginManager, *restoreReq.GetItemOperationsList())
if len(errs) > 0 {
for err := range errs {
restoreLog.Error(err)
for _, err := range errs {
restoreErrors.Velero = append(restoreErrors.Velero, fmt.Sprintf("error from restore item operation: %v", err))
}
}