mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-08-24 16:16:09 +00:00
Merge branch 'release-1.17' into copilot/backport-10047-again
This commit is contained in:
@@ -666,11 +666,11 @@ func (r *DataDownloadReconciler) findSnapshotRestoreForPod(ctx context.Context,
|
||||
r.prepareDataDownload(dd)
|
||||
return true
|
||||
}); err != nil {
|
||||
log.WithError(err).Warn("failed to update dataudownload, prepare will halt for this dataudownload")
|
||||
log.WithError(err).Warn("failed to update datadownload, prepare will halt for this datadownload")
|
||||
return []reconcile.Request{}
|
||||
}
|
||||
} else if unrecoverable, reason := kube.IsPodUnrecoverable(pod, log); unrecoverable {
|
||||
err := UpdateDataDownloadWithRetry(context.Background(), r.client, types.NamespacedName{Namespace: dd.Namespace, Name: dd.Name}, r.logger.WithField("datadownlad", dd.Name),
|
||||
err := UpdateDataDownloadWithRetry(context.Background(), r.client, types.NamespacedName{Namespace: dd.Namespace, Name: dd.Name}, r.logger.WithField("datadownload", dd.Name),
|
||||
func(dataDownload *velerov2alpha1api.DataDownload) bool {
|
||||
if dataDownload.Spec.Cancel {
|
||||
return false
|
||||
|
||||
@@ -326,7 +326,7 @@ func WaitJobComplete(cli client.Client, ctx context.Context, jobName, ns string,
|
||||
if maintenanceJob.Status.Failed > 0 {
|
||||
if r, err := getResultFromJob(cli, maintenanceJob); err != nil {
|
||||
log.WithError(err).Warn("Failed to get maintenance job result")
|
||||
result = "Repo maintenance failed but result is not retrieveable"
|
||||
result = "Repo maintenance failed but result is not retrievable"
|
||||
} else {
|
||||
result = r
|
||||
}
|
||||
@@ -382,7 +382,7 @@ func WaitAllJobsComplete(ctx context.Context, cli client.Client, repo *velerov1a
|
||||
if job.Status.Failed > 0 {
|
||||
if msg, err := getResultFromJob(cli, job); err != nil {
|
||||
log.WithError(err).Warnf("Failed to get result of maintenance job %s", job.Name)
|
||||
message = fmt.Sprintf("Repo maintenance failed but result is not retrieveable, err: %v", err)
|
||||
message = fmt.Sprintf("Repo maintenance failed but result is not retrievable, err: %v", err)
|
||||
} else {
|
||||
message = msg
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ func TestWaitAllJobsComplete(t *testing.T) {
|
||||
{
|
||||
Result: velerov1api.BackupRepositoryMaintenanceFailed,
|
||||
StartTimestamp: &metav1.Time{Time: now.Add(time.Hour)},
|
||||
Message: "Repo maintenance failed but result is not retrieveable, err: no pod found for job job2",
|
||||
Message: "Repo maintenance failed but result is not retrievable, err: no pod found for job job2",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user