File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed
cmd/compute-domain-kubelet-plugin Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -112,20 +112,21 @@ func (m *CheckpointCleanupManager) unprepareIfStale(ctx context.Context, cpuid s
112112 }
113113
114114 claim , err := m .getClaimByName (ctx , cpclaim .Name , cpclaim .Namespace )
115+ if err != nil && errors .IsNotFound (err ) {
116+
117+ klog .V (4 ).Infof (
118+ "Checkpointed RC cleanup: partially prepared claim '%s/%s:%s' is stale: not found in API server" ,
119+ cpclaim .Namespace ,
120+ cpclaim .Name ,
121+ cpuid )
122+ m .unprepare (ctx , cpuid , cpclaim )
123+ return
124+ }
125+
126+ // A transient error during API server lookup. No explicit retry required.
127+ // The next periodic cleanup invocation will implicitly retry.
115128 if err != nil {
116- if errors .IsNotFound (err ) {
117- klog .V (4 ).Infof (
118- "Checkpointed RC cleanup: partially prepared claim '%s/%s:%s' is stale: not found in API server" ,
119- cpclaim .Namespace ,
120- cpclaim .Name ,
121- cpuid )
122- m .unprepare (ctx , cpuid , cpclaim )
123- } else {
124- // A transient error during API server lookup. No explicit retry
125- // required. The next periodic cleanup invocation will
126- // implicitly retry.
127- klog .Infof ("Checkpointed RC cleanup: skip for checkpointed claim %s: getClaimByName failed (retry later): %s" , cpuid , err )
128- }
129+ klog .Infof ("Checkpointed RC cleanup: skip for checkpointed claim %s: getClaimByName failed (retry later): %s" , cpuid , err )
129130 return
130131 }
131132
You can’t perform that action at this time.
0 commit comments