Skip to content

Commit

Permalink
Merge pull request #1168 from jewelzqiu/fix-reconcile-crash
Browse files Browse the repository at this point in the history
fix crash when reconcilePVC() failed
  • Loading branch information
sunsingerus authored Jun 5, 2023
2 parents 0cf969b + f488d22 commit c852d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/chi/worker-reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,14 +801,14 @@ func (w *worker) reconcilePVCs(ctx context.Context, host *chiV1.ChiHost) error {
}
}

pvc, err = w.reconcilePVC(ctx, pvc, host, volumeClaimTemplate)
newPvc, err := w.reconcilePVC(ctx, pvc, host, volumeClaimTemplate)
if err != nil {
w.a.M(host).F().Error("ERROR unable to reconcile PVC(%s/%s) err: %v", namespace, pvcName, err)
w.task.registryFailed.RegisterPVC(pvc.ObjectMeta)
return
}

w.task.registryReconciled.RegisterPVC(pvc.ObjectMeta)
w.task.registryReconciled.RegisterPVC(newPvc.ObjectMeta)
})

return nil
Expand Down

0 comments on commit c852d03

Please sign in to comment.