mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-30 05:43:58 +00:00
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. vSphere test infrastructure improvement and new node-unregister test **What this PR does / why we need it**: - Created conf file parsing logic for vSphere tests - Created NodeMapper to generate node-vsphere map - Updated bootstrap to parse conf file and generate node-vsphere map, and set it in TestContext - Moved bootstrap.go and context.go up, in vsphere package to avoid cyclic package dependencies - Added node register/unregister test, that consumes new test-infra **Which issue(s) this PR fixes**: Fixes https://github.com/vmware/kubernetes/issues/437 Fixes https://github.com/vmware/kubernetes/issues/379 **Special notes for your reviewer**: - Successfully ran vSphere e2e tests to ensure that the bootstrapping is happening only once. More tests in progress - Successfully ran 'Node Unregister' ``` bash-3.2$ go run hack/e2e.go --check-version-skew=false --v --test --test_args=‘--ginkgo.focus=Node\sUnregister’ flag provided but not defined: -check-version-skew Usage of /var/folders/97/lnlv1n317xl2ty8hdn7zptxr00b37m/T/go-build743103230/command-line-arguments/_obj/exe/e2e: -get go get -u kubetest if old or not installed (default true) -old duration Consider kubetest old if it exceeds this (default 24h0m0s) Will run 1 of 724 specs Feb 5 22:20:09.890: INFO: >>> kubeConfig: /Users/pshahzeb/kube176.json Feb 5 22:20:09.903: INFO: Waiting up to 4h0m0s for all (but 0) nodes to be schedulable Feb 5 22:20:10.036: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace ‘kube-system’ to be running and ready Feb 5 22:20:10.182: INFO: 13 / 13 pods in namespace ‘kube-system’ are running and ready (0 seconds elapsed) Feb 5 22:20:10.182: INFO: expected 4 pod replicas in namespace ‘kube-system’, 4 are Running and Ready. Feb 5 22:20:10.203: INFO: Waiting for pods to enter Success, but no pods in “kube-system” match label map[name:e2e-image-puller] Feb 5 22:20:10.203: INFO: Dumping network health container logs from all nodes... Feb 5 22:20:10.236: INFO: e2e test version: v1.6.0-alpha.0.22494+e66916e052163a-dirty Feb 5 22:20:10.261: INFO: kube-apiserver version: v1.9.2 SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS ------------------------------ [sig-storage] Node Unregister [Feature:vsphere] [Slow] [Disruptive] node unregister /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere/vsphere_volume_node_delete.go:53 [BeforeEach] [sig-storage] Node Unregister [Feature:vsphere] [Slow] [Disruptive] /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:141 STEP: Creating a kubernetes client Feb 5 22:20:10.268: INFO: >>> kubeConfig: /Users/pshahzeb/kube176.json STEP: Building a namespace api object Feb 5 22:20:11.043: INFO: No PodSecurityPolicies found; assuming PodSecurityPolicy is disabled. STEP: Waiting for a default service account to be provisioned in namespace [BeforeEach] [sig-storage] Node Unregister [Feature:vsphere] [Slow] [Disruptive] /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere/vsphere_volume_node_delete.go:41 Feb 5 22:20:11.063: INFO: Initializing vc server 10.160.240.176 Feb 5 22:20:11.063: INFO: ConfigFile &{{administrator@vsphere.local Admin!23 443 true k8s-dc 0} map[10.160.240.176:0xc420babe30] {VM Network} {pvscsi} {10.160.240.176 k8s-dc kubernetes vsanDatastore k8s-cluster}} vSphere instances map[10.160.240.176:0xc420b08830] [It] node unregister /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere/vsphere_volume_node_delete.go:53 STEP: Get total Ready nodes Feb 5 22:20:11.566: INFO: vmx file path is [vsanDatastore] 2e98735a-cdb9-c3f3-63d8-020010188a6a/kubernetes-node1.vmx STEP: Unregister a node VM Feb 5 22:20:11.686: INFO: Powering off node VM kubernetes-node1 Feb 5 22:20:14.148: INFO: Unregistering node VM kubernetes-node1 STEP: Verifying the ready node counts STEP: Register back the node VM Feb 5 22:20:49.490: INFO: Registering node VM kubernetes-node1 Feb 5 22:20:51.785: INFO: Powering on node VM kubernetes-node1 STEP: Verifying the ready node counts Feb 5 22:21:40.600: INFO: Condition Ready of node kubernetes-node1 is false instead of true. Reason: KubeletNotReady, message: container runtime is down Feb 5 22:21:45.625: INFO: Condition Ready of node kubernetes-node1 is false instead of true. Reason: KubeletNotReady, message: container runtime is down STEP: Sanity check for volume lifecycle STEP: Creating Storage Class With storage policy params STEP: Creating PVC using the Storage Class STEP: Waiting for claim to be in bound phase Feb 5 22:21:50.718: INFO: Waiting up to 5m0s for PersistentVolumeClaim pvc-ztj7g to have phase Bound Feb 5 22:22:15.053: INFO: PersistentVolumeClaim pvc-ztj7g found and phase=Bound (24.334875493s) STEP: Creating pod to attach PV to the node STEP: Verify the volume is accessible and available in the pod Feb 5 22:22:25.976: INFO: Running ‘/Users/pshahzeb/k8s/kubernetes/_output/bin/kubectl --server=https://10.160.241.49 --kubeconfig=/Users/pshahzeb/kube176.json exec pvc-tester-q7q2w --namespace=e2e-tests-node-unregister-csdrc -- /bin/touch /mnt/volume1/emptyFile.txt’ Feb 5 22:22:26.740: INFO: stderr: “” Feb 5 22:22:26.740: INFO: stdout: “” STEP: Deleting pod Feb 5 22:22:26.740: INFO: Deleting pod “pvc-tester-q7q2w” in namespace “e2e-tests-node-unregister-csdrc” Feb 5 22:22:26.799: INFO: Wait up to 5m0s for pod “pvc-tester-q7q2w” to be fully deleted STEP: Waiting for volumes to be detached from the node Feb 5 2223:16.966: INFO: Volume “[vsanDatastore] f0c55f5a-7349-1aad-2464-02001067f24e/kubernetes-dynamic-pvc-04775fe5-0b06-11e8-9872-005056809c8d.vmdk” has successfully detached from “kubernetes-node1" Feb 5 2223:16.966: INFO: Deleting PersistentVolumeClaim “pvc-ztj7g” [AfterEach] [sig-storage] Node Unregister [Feature:vsphere] [Slow] [Disruptive] /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/framework.go:142 Feb 5 2223:17.026: INFO: Waiting up to 3m0s for all (but 0) nodes to be ready STEP: Destroying namespace “e2e-tests-node-unregister-csdrc” for this suite. Feb 5 2223:23.158: INFO: Waiting up to 30s for server preferred namespaced resources to be successfully discovered Feb 5 2223:24.421: INFO: namespace: e2e-tests-node-unregister-csdrc, resource: bindings, ignored listing per whitelist Feb 5 2223:24.795: INFO: namespace e2e-tests-node-unregister-csdrc deletion completed in 7.715803086s • [SLOW TEST:194.521 seconds] [sig-storage] Node Unregister [Feature:vsphere] [Slow] [Disruptive] /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/utils/framework.go:22 node unregister /Users/pshahzeb/k8s/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/vsphere/vsphere_volume_node_delete.go:53 ------------------------------ SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSFeb 5 2223:24.797: INFO: Running AfterSuite actions on all node Feb 5 2223:24.798: INFO: Running AfterSuite actions on node 1 Ran 1 of 724 Specs in 194.905 seconds SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 723 Skipped PASS Ginkgo ran 1 suite in 3m15.529747133s Test Suite Passed 2018/02/05 2223:24 util.go:174: Step ‘./hack/ginkgo-e2e.sh --ginkgo.focus=Node\sUnregister’ finished in 3m16.095671615s 2018/02/05 2223:24 e2e.go:81: Done ``` **Release note**: ```release-note NONE ```