mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Fix kubelet's PodAdmitResult's message
This commit is contained in:
		@@ -84,7 +84,7 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult
 | 
				
			|||||||
			glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
 | 
								glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
 | 
				
			||||||
		case *predicates.InsufficientResourceError:
 | 
							case *predicates.InsufficientResourceError:
 | 
				
			||||||
			reason = fmt.Sprintf("OutOf%s", re.ResourceName)
 | 
								reason = fmt.Sprintf("OutOf%s", re.ResourceName)
 | 
				
			||||||
			message := re.Error()
 | 
								message = re.Error()
 | 
				
			||||||
			glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
 | 
								glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
 | 
				
			||||||
		case *predicates.FailureReason:
 | 
							case *predicates.FailureReason:
 | 
				
			||||||
			reason = re.GetReason()
 | 
								reason = re.GetReason()
 | 
				
			||||||
@@ -92,7 +92,7 @@ func (w *predicateAdmitHandler) Admit(attrs *PodAdmitAttributes) PodAdmitResult
 | 
				
			|||||||
			glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
 | 
								glog.V(2).Infof("Predicate failed on Pod: %v, for reason: %v", format.Pod(pod), message)
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			reason = "UnexpectedPredicateFailureType"
 | 
								reason = "UnexpectedPredicateFailureType"
 | 
				
			||||||
			message := fmt.Sprintf("GeneralPredicates failed due to %v, which is unexpected.", r)
 | 
								message = fmt.Sprintf("GeneralPredicates failed due to %v, which is unexpected.", r)
 | 
				
			||||||
			glog.Warningf("Failed to admit pod %v - %s", format.Pod(pod), message)
 | 
								glog.Warningf("Failed to admit pod %v - %s", format.Pod(pod), message)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		return PodAdmitResult{
 | 
							return PodAdmitResult{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user