Skip to content

Commit a8b48ab

Browse files
committed
retry nimservice reconcile on api conflict errors
Signed-off-by: Varun Ramachandra Sekar <vsekar@nvidia.com>
1 parent 23d1446 commit a8b48ab

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/controller/platform/standalone/standalone.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ func (s *Standalone) Sync(ctx context.Context, r shared.Reconciler, resource cli
115115
logger.Info("Reconciling NIMService instance", "nimservice", nimService.GetName())
116116
result, err := reconciler.reconcileNIMService(ctx, nimService)
117117
if err != nil {
118+
if !errors.IsConflict(err) {
119+
// Ignore conflict errors and retry.
120+
return result, err
121+
}
118122
r.GetEventRecorder().Eventf(nimService, corev1.EventTypeWarning, "ReconcileFailed",
119123
"NIMService %s failed, msg: %s", nimService.Name, err.Error())
120124
errConditionUpdate := reconciler.updater.SetConditionsFailed(ctx, nimService, conditions.Failed, err.Error())

0 commit comments

Comments
 (0)