cancel pvb/pvr on velero server restarts

Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
Lyndon-Li
2025-06-23 15:29:09 +08:00
parent 9500f0b82f
commit cded6bd207
7 changed files with 101 additions and 10 deletions
@@ -833,7 +833,7 @@ func UpdatePVBWithRetry(ctx context.Context, client client.Client, namespacedNam
err := client.Update(ctx, pvb)
if err != nil {
if apierrors.IsConflict(err) {
log.Warnf("failed to update PVB for %s/%s and will retry it", pvb.Namespace, pvb.Name)
log.Debugf("failed to update PVB for %s/%s and will retry it", pvb.Namespace, pvb.Name)
return false, nil
} else {
return false, errors.Wrapf(err, "error updating PVB with error %s/%s", pvb.Namespace, pvb.Name)