mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #56221 from deads2k/gc-03-errors
Automatic merge from submit-queue (batch tested with PRs 52767, 55065, 55148, 56228, 56221). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. log errors while trying to GC resources If GC can't update a finalizer, we need to see evidence of that failure. This updates the code to log it.
This commit is contained in:
commit
2f6e7bfc0d
@ -559,14 +559,14 @@ func (gc *GarbageCollector) attemptToOrphanWorker() bool {
|
||||
|
||||
err := gc.orphanDependents(owner.identity, dependents)
|
||||
if err != nil {
|
||||
glog.V(5).Infof("orphanDependents for %s failed with %v", owner.identity, err)
|
||||
utilruntime.HandleError(fmt.Errorf("orphanDependents for %s failed with %v", owner.identity, err))
|
||||
gc.attemptToOrphan.AddRateLimited(item)
|
||||
return true
|
||||
}
|
||||
// update the owner, remove "orphaningFinalizer" from its finalizers list
|
||||
err = gc.removeFinalizer(owner, metav1.FinalizerOrphanDependents)
|
||||
if err != nil {
|
||||
glog.V(5).Infof("removeOrphanFinalizer for %s failed with %v", owner.identity, err)
|
||||
utilruntime.HandleError(fmt.Errorf("removeOrphanFinalizer for %s failed with %v", owner.identity, err))
|
||||
gc.attemptToOrphan.AddRateLimited(item)
|
||||
}
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user