mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	fix: fix error checking in kl.killPod within SyncPod
This commit is contained in:
		@@ -1863,11 +1863,11 @@ func (kl *Kubelet) SyncPod(ctx context.Context, updateType kubetypes.SyncPodType
 | 
				
			|||||||
		if !pcm.Exists(pod) && !firstSync {
 | 
							if !pcm.Exists(pod) && !firstSync {
 | 
				
			||||||
			p := kubecontainer.ConvertPodStatusToRunningPod(kl.getRuntime().Type(), podStatus)
 | 
								p := kubecontainer.ConvertPodStatusToRunningPod(kl.getRuntime().Type(), podStatus)
 | 
				
			||||||
			if err := kl.killPod(ctx, pod, p, nil); err == nil {
 | 
								if err := kl.killPod(ctx, pod, p, nil); err == nil {
 | 
				
			||||||
				if wait.Interrupted(err) {
 | 
					 | 
				
			||||||
					return false, err
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				podKilled = true
 | 
									podKilled = true
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
 | 
									if wait.Interrupted(err) {
 | 
				
			||||||
 | 
										return false, nil
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				klog.ErrorS(err, "KillPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
 | 
									klog.ErrorS(err, "KillPod failed", "pod", klog.KObj(pod), "podStatus", podStatus)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user