jenkins-x / jx

Jenkins X provides automated CI+CD for Kubernetes with Preview Environments on Pull Requests using Cloud Native pipelines from Tekton
https://jenkins-x.io/
Apache License 2.0
4.57k stars 787 forks source link

jx compliance check failed - [Error] 2 node(s) didn't match node selector #1584

Closed shawnho1018 closed 6 years ago

shawnho1018 commented 6 years ago

Summary

Running jx compliance status failed.

Steps to reproduce the behavior

Jx version

1.3.209 The output of jx version is:

COPY OUTPUT HERE

[sig-scheduling] SchedulerPredicates [Serial] validates that NodeSelector is respected if not matching [Conformance] /workspace/anago-v1.11.2-beta.0.50+bb9ffb1654d4a7/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:684 [BeforeEach] [sig-scheduling] SchedulerPredicates [Serial] /workspace/anago-v1.11.2-beta.0.50+bb9ffb1654d4a7/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:141 STEP: Creating a kubernetes client Sep 4 12:43:23.879: INFO: >>> kubeConfig: /tmp/kubeconfig-981303422 STEP: Building a namespace api object STEP: Waiting for a default service account to be provisioned in namespace [BeforeEach] [sig-scheduling] SchedulerPredicates [Serial] /workspace/anago-v1.11.2-beta.0.50+bb9ffb1654d4a7/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/scheduling/predicates.go:80 Sep 4 12:43:23.930: INFO: Waiting up to 1m0s for all nodes to be ready Sep 4 12:44:23.940: INFO: Waiting for terminating namespaces to be deleted... Sep 4 12:44:23.942: INFO: Waiting up to 5m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready Sep 4 12:44:23.946: INFO: 0 / 0 pods in namespace 'kube-system' are running and ready (0 seconds elapsed) Sep 4 12:44:23.946: INFO: expected 0 pod replicas in namespace 'kube-system', 0 are Running and Ready. Sep 4 12:44:23.947: INFO: Waiting for pods to enter Success, but no pods in "kube-system" match label map[name:e2e-image-puller] Sep 4 12:44:23.947: INFO: Logging pods the kubelet thinks is on node worker-2dfaea40-b03f-11e8-a0f0-061a39cd6d80 before test Sep 4 12:44:23.949: INFO: canal-node-1-10-2-62-276zt from vke-system started at 2018-09-04 12:38:54 +0000 UTC (3 container statuses recorded) Sep 4 12:44:23.949: INFO: Container calico-node ready: true, restart count 0 Sep 4 12:44:23.949: INFO: Container flannel ready: true, restart count 0 Sep 4 12:44:23.949: INFO: Container install-calico-cni ready: true, restart count 0 Sep 4 12:44:23.949: INFO: sonobuoy from heptio-sonobuoy started at 2018-09-04 12:39:42 +0000 UTC (1 container statuses recorded) Sep 4 12:44:23.949: INFO: Container kube-sonobuoy ready: true, restart count 0 Sep 4 12:44:23.949: INFO: sonobuoy-e2e-job-21e94d2da3664758 from heptio-sonobuoy started at 2018-09-04 12:40:06 +0000 UTC (2 container statuses recorded) Sep 4 12:44:23.949: INFO: Container e2e ready: true, restart count 0 Sep 4 12:44:23.949: INFO: Container sonobuoy-worker ready: true, restart count 0 [It] validates that NodeSelector is respected if not matching [Conformance] /workspace/anago-v1.11.2-beta.0.50+bb9ffb1654d4a7/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:684 STEP: Trying to schedule Pod with nonempty NodeSelector. STEP: Considering event: Type = [Warning], Name = [restricted-pod.1551330988ff3f35], Reason = [FailedScheduling], Message = [0/2 nodes are available: 2 node(s) didn't match node selector.] [AfterEach] [sig-scheduling] SchedulerPredicates [Serial] /workspace/anago-v1.11.2-beta.0.50+bb9ffb1654d4a7/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:142 Sep 4 12:44:24.961: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready STEP: Destroying namespace "e2e-tests-sched-pred-jg4tk" for this suite.

Kubernetes cluster

What kind of Kubernetes cluster are you using & how did you create it? VMware Kubernetes Engine. vke cluster create -n [cluster-name] -l DEVELOPER --region us-west-2 [However, I deploy the cluster in advance without using jenkins-x.]

Operating system / Environment

Mac OS Sierra

Expected behavior

jx compliance status succeed

Actual behavior

jx compliance status failed.

ccojocar commented 6 years ago

I would try to address this issue to https://github.com/heptio/sonobuoy project. We use their client. I am not sure if they support the VMWare Kubernetes Engine.

shawnho1018 commented 6 years ago

@ccojocar Thanks for your prompt response. From the error message, I am guessing the problem occurs because I don't have enough cluster size. The re-requisite is 4 CPU (A cluster with at least 4 vCpus in addition to the master node (e.g. 2 m4.large nodes + m4.large master). On VKE, since they are using the "Smart Cluster" capability, there is only 2vCPU to begin with. The cluster will increase according to the resource we further requested. Not sure if we could lift the requirement of node-selector.

ccojocar commented 6 years ago

@shawnho1018 I am closing this issue, because it does not seems to be related to jx. Please could you open another issue if you are still having problem.