Avoid wrapping failed PVB status with empty message.

Also change "get" to "found" as requested in issue #7857.

Signed-off-by: Matthew Arnold <marnold@redhat.com>
This commit is contained in:
Matthew Arnold
2024-07-18 15:57:11 -04:00
parent 55e027897c
commit c8a0c345dc
2 changed files with 7 additions and 2 deletions

View File

@@ -412,7 +412,7 @@ func (s *nodeAgentServer) markInProgressPVBsFailed(client ctrlclient.Client) {
}
if err := controller.UpdatePVBStatusToFailed(s.ctx, client, &pvbs.Items[i],
fmt.Errorf("get a podvolumebackup with status %q during the server starting, mark it as %q", velerov1api.PodVolumeBackupPhaseInProgress, velerov1api.PodVolumeBackupPhaseFailed),
fmt.Errorf("found a podvolumebackup with status %q during the server starting, mark it as %q", velerov1api.PodVolumeBackupPhaseInProgress, velerov1api.PodVolumeBackupPhaseFailed),
"", time.Now(), s.logger); err != nil {
s.logger.WithError(errors.WithStack(err)).Errorf("failed to patch podvolumebackup %q", pvb.GetName())
continue