Return when removePod failed
This commit is contained in:
		
							
								
								
									
										4
									
								
								pkg/scheduler/internal/cache/cache.go
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								pkg/scheduler/internal/cache/cache.go
									
									
									
									
										vendored
									
									
								
							@@ -407,7 +407,9 @@ func (cache *schedulerCache) AddPod(pod *v1.Pod) error {
 | 
				
			|||||||
			// The pod was added to a different node than it was assumed to.
 | 
								// The pod was added to a different node than it was assumed to.
 | 
				
			||||||
			klog.Warningf("Pod %v was assumed to be on %v but got added to %v", key, pod.Spec.NodeName, currState.pod.Spec.NodeName)
 | 
								klog.Warningf("Pod %v was assumed to be on %v but got added to %v", key, pod.Spec.NodeName, currState.pod.Spec.NodeName)
 | 
				
			||||||
			// Clean this up.
 | 
								// Clean this up.
 | 
				
			||||||
			cache.removePod(currState.pod)
 | 
								if err = cache.removePod(currState.pod); err != nil {
 | 
				
			||||||
 | 
									klog.Errorf("removing pod error: %v", err)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			cache.addPod(pod)
 | 
								cache.addPod(pod)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		delete(cache.assumedPods, key)
 | 
							delete(cache.assumedPods, key)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user