Code change:
}, } <del> // addOrUpdateAvoidPodOnNode adds avoidPods annotations to node, will override if it exists func addOrUpdateAvoidPodOnNode(c clientset.Interface, nodeName string, avoidPods v1.AvoidPods) { err := wait.PollImmediate(framework.Poll, framework.SingleCallTimeout, func() (bool, error) { node, err := c.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) if err != nil { return false, err } taintsData, err := json.Marshal(avoidPods) framework.ExpectNoError(err) if node.Annotations == nil { node.Annotations = make(map[string]string) } node.Annotations[v1.PreferAvoidPodsAnnotationKey] = string(taintsData) _, err = c.CoreV1().Nodes().Update(context.TODO(), node, metav1.UpdateOptions{}) if err != nil { if !apierrors.IsConflict(err) { framework.ExpectNoError(err) } else { framework.Logf("Conflict when trying to add/update avoidPods %v to %v with error %v", avoidPods, nodeName, err) return false, nil } } return true, nil }) framework.ExpectNoError(err) } // removeAvoidPodsOffNode removes AvoidPods annotations from the node. It does not fail if no such annotation exists. func removeAvoidPodsOffNode(c clientset.Interface, nodeName string) { err := wait.PollImmediate(framework.Poll, framework.SingleCallTimeout, func() (bool, error) { node, err := c.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) if err != nil { return false, err } if node.Annotations == nil { return true, nil } delete(node.Annotations, v1.PreferAvoidPodsAnnotationKey) _, err = c.CoreV1().Nodes().Update(context.TODO(), node, metav1.UpdateOptions{}) if err != nil { if !apierrors.IsConflict(err) { framework.ExpectNoError(err) } else { framework.Logf("Conflict when trying to remove avoidPods to %v", nodeName) return false, nil } } return true, nil }) framework.ExpectNoError(err) } </del> // nodesAreTooUtilized ensures that each node can support 2*crioMinMemLimit // We check for double because it needs to support at least the cri-o minimum // plus whatever delta between node usages (which could be up to or at least crioMinMemLimit)

Related discussion:
text: <!-- Please only use this template for submitting reports about continuously failing tests or jobs in Kubernetes CI --ci-kubernetes-e2e-gci-gce-serial (gce-cos-master-serial) Kubernetes e2e suite.[sig-scheduling] SchedulerPriorities [Serial] Pod should avoid nodes that have avoidPod annotation June 19th 2021 () Testgrid: https://k8s- Prow history: Looks like pods are scheduled where they shouldn't be? : The tests passes in maybe 20% of the builds, but it looks random, so I don't treat it as a flake. At the moment there are also sig-storage tests consistently failing in this job: , They don't look related though. /sig scheduling /kind failing-test
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/milestone v1.22
try to have a look.
try to have a look.
/cc
This is expected. The feature (which was alpha) is now disabled by default. Users can still enable it by switching to a v1beta1 scheduler component config. Let's remove the test.