fix a scheduler preemption issue that victim is not patched properly
This commit is contained in:
		| @@ -366,7 +366,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1. | |||||||
| 				Reason:  v1.PodReasonPreemptionByScheduler, | 				Reason:  v1.PodReasonPreemptionByScheduler, | ||||||
| 				Message: fmt.Sprintf("%s: preempting to accommodate a higher priority pod", pod.Spec.SchedulerName), | 				Message: fmt.Sprintf("%s: preempting to accommodate a higher priority pod", pod.Spec.SchedulerName), | ||||||
| 			} | 			} | ||||||
| 			newStatus := pod.Status.DeepCopy() | 			newStatus := victim.Status.DeepCopy() | ||||||
| 			updated := apipod.UpdatePodCondition(newStatus, condition) | 			updated := apipod.UpdatePodCondition(newStatus, condition) | ||||||
| 			if updated { | 			if updated { | ||||||
| 				if err := util.PatchPodStatus(ctx, cs, victim, newStatus); err != nil { | 				if err := util.PatchPodStatus(ctx, cs, victim, newStatus); err != nil { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Wei Huang
					Wei Huang