Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduler predicates tests should consider unschedulable #28970

Conversation

pskrzyns
Copy link

fixes #28857

@pskrzyns
Copy link
Author

cc @kubernetes/sig-testing

@k8s-github-robot k8s-github-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. release-note-label-needed labels Jul 14, 2016
@@ -197,7 +197,10 @@ var _ = framework.KubeDescribe("SchedulerPredicates [Serial]", func() {
c = f.Client
ns = f.Namespace.Name
nodeList = &api.NodeList{}
nodes, err := c.Nodes().List(api.ListOptions{})
nodes, err := c.Nodes().List(api.ListOptions{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spxtr spxtr assigned rmmh and unassigned fejta Jul 15, 2016
@pskrzyns pskrzyns force-pushed the sheduler_tests_should_consider_unschedulable branch from 486055d to d044347 Compare July 15, 2016 19:05
@pskrzyns
Copy link
Author

@spiffxp thx for pointing out,
Is there some document describing framework or just self describing code ;) ?

@rmmh
Copy link
Contributor

rmmh commented Jul 15, 2016

LGTM

@rmmh rmmh added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Jul 15, 2016
@pskrzyns pskrzyns force-pushed the sheduler_tests_should_consider_unschedulable branch from d044347 to 1d7ee42 Compare July 18, 2016 13:59
@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 18, 2016
@lukaszo
Copy link
Contributor

lukaszo commented Jul 18, 2016

I think it may also fix #27655

@k8s-bot
Copy link

k8s-bot commented Jul 18, 2016

GCE e2e build/test passed for commit 1d7ee42.

@pskrzyns
Copy link
Author

Need LGTM after rebase

@spxtr spxtr added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 18, 2016
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jul 19, 2016

GCE e2e build/test passed for commit 1d7ee42.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 8f8e620 into kubernetes:master Jul 19, 2016
@gmarek
Copy link
Contributor

gmarek commented Jul 20, 2016

This most likely broke MaxPods test - master node is not schedulable, so we don't put master machine on the list, which means we're not correctly filtering out pods in getPodsScheduled function. Reverting.

Correct fix would be to add a check in the else part of the loop:

for _, node := range nodes.Items {
            if system.IsMasterNode(&node) {
                masterNodes.Insert(node.Name)
            } else {
                nodeList.Items = append(nodeList.Items, node)
            }
        }

though it's not needed for our jenkins setup. It won't solve taints, as GetReadySchedulableNodesOrDie looks only if the Node (and it's network) is ready, and checks the Unschedulable bit in NodeSpec and ignores taints.

@pskrzyns pskrzyns deleted the sheduler_tests_should_consider_unschedulable branch August 8, 2016 12:48
k8s-github-robot pushed a commit that referenced this pull request Aug 8, 2016
…OrDie_in_scheduler_predicates_tests

Automatic merge from submit-queue

Use GetMasterAndWorkerNodesOrDie in scheduler predicates tests

fixes #28857
follow up to #28970

Makes sure that unschedulable node won't be count as worker node.
Its using [GetMasterAndWorkerNodesOrDie](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/util.go#L4743) method which is used also in [density tests](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/density.go#L389).

@gmarek PTAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
10 participants