k3s/test/e2e_node
Kubernetes Submit Queue 5645ca749b Merge pull request #30941 from Random-Liu/remove-fatal-in-e2e-suite
Automatic merge from submit-queue

Node E2E: Remove fatal error in e2e_node_suite_test.go

Addresses https://github.com/kubernetes/kubernetes/issues/30779#issuecomment-240532190.

Currently we run node e2e test in parallel, and ginkgo makes sure that we only initialize test framework in the first test node.
However, because we throw out some fatal error during the initialization. Once there is an fatal error, the first test node will die immediately without reporting any error, and the other nodes will exit because the first node is gone with meaningless error.

If kubelet start fails, we'll get something like:
```
------------------------------
Failure [132.485 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
------------------------------
......
------------------------------
Failure [132.465 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
```

This PR replaces these fatal errors with gomega assertion, with this PR, we'll get:
```
Failure [132.482 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  should be able to start node services.
  Expected success, but got an error:
      <*errors.errorString | 0xc8203351b0>: {
          s: "failed to run server start command \"/tmp/ginkgo869068712/e2e_node.test --run-services-mode --server-start-timeout 2m0s --report-dir  --node-name lantaol0.mtv.corp.google.com --disable-kubenet=true --cgroups-per-qos=false --manifest-path /tmp/node-e2e-pod221291440 --eviction-hard memory.available<250Mi\": exit status 255",
      }
      failed to run server start command "/tmp/ginkgo869068712/e2e_node.test --run-services-mode --server-start-timeout 2m0s --report-dir  --node-name lantaol0.mtv.corp.google.com --disable-kubenet=true --cgroups-per-qos=false --manifest-path /tmp/node-e2e-pod221291440 --eviction-hard memory.available<250Mi": exit status 255

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:117
------------------------------
Failure [132.485 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
------------------------------
......
------------------------------
Failure [132.465 seconds]
[BeforeSuite] BeforeSuite 
/usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138

  BeforeSuite on Node 1 failed

  /usr/local/google/home/lantaol/workspace/src/k8s.io/kubernetes/test/e2e_node/e2e_node_suite_test.go:138
```

This is much more informative.

/cc @kubernetes/sig-node
2016-08-21 18:21:22 -07:00
..
environment Update core etcd references to use 3.0.4 2016-08-12 13:39:07 -05:00
jenkins Merge pull request #31039 from coufon/add_benchmark_to_jenkins 2016-08-21 08:32:39 -07:00
runner add benchmark to jenkins 2016-08-20 09:43:42 -07:00
OWNERS add Lantao Liu as node e2e reviewer. Relieve pwittroc@ from node e2e maintenance 2016-08-11 12:56:05 -07:00
README.md Fix broken warning image link in docs 2016-07-15 10:44:58 +01:00
apiserver.go Statically link apiserver to node e2e. 2016-08-20 17:41:34 -07:00
apparmor_test.go Add AppArmor E2E test 2016-08-15 13:25:22 -07:00
benchmark_util.go add peak (100%) lantecy and CPU usage in perf data 2016-08-19 14:33:38 -07:00
cgroup_manager_test.go Disable cgroups-per-qos flag until implementation is stabilized 2016-08-19 11:08:59 -04:00
container.go Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
container_manager_test.go Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
density_test.go add peak (100%) lantecy and CPU usage in perf data 2016-08-19 14:33:38 -07:00
disk_eviction_test.go Adding disk eviciton test to node e2e tests 2016-08-19 21:28:02 -07:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
e2e_build.go Stop throwing fatal error in buildGo to fix vm leak. 2016-08-16 18:12:21 -07:00
e2e_node_suite_test.go Merge pull request #30941 from Random-Liu/remove-fatal-in-e2e-suite 2016-08-21 18:21:22 -07:00
e2e_remote.go add benchmark to jenkins 2016-08-20 09:43:42 -07:00
e2e_service.go Statically link apiserver to node e2e. 2016-08-20 17:41:34 -07:00
etcd.go Statically link etcd into node e2e. 2016-08-17 02:06:35 -07:00
gubernator.sh Fix GCS permissions and file moving bugs 2016-08-18 14:51:33 -07:00
image.go Revert "Remove pod mutation for PVs with supplemental GIDs" 2016-07-14 17:47:46 -07:00
image_conformance_test.go Skip Flaky, Slow and Serial test in proper jenkins job. 2016-08-02 02:13:50 +00:00
image_list.go make GCI the default node e2e test image. Fix bugs in runner 2016-08-10 11:25:40 -07:00
kubelet_test.go Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
memory_eviction_test.go Merge pull request #30476 from mtaufen/eviction_fix 2016-08-19 17:22:05 -07:00
mirror_pod_test.go Add run-services-mode option, and start e2e services in a separate 2016-08-15 14:45:01 -07:00
namespace_controller.go Move namespace controller into e2e services. 2016-08-18 02:18:07 -07:00
resource_collector.go add peak (100%) lantecy and CPU usage in perf data 2016-08-19 14:33:38 -07:00
resource_usage_test.go add labels to perf dataset 2016-08-18 17:15:43 -07:00
runtime_conformance_test.go Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
util.go Add run-services-mode option, and start e2e services in a separate 2016-08-15 14:45:01 -07:00

README.md

WARNING WARNING WARNING WARNING WARNING

PLEASE NOTE: This document applies to the HEAD of the source tree

If you are using a released version of Kubernetes, you should refer to the docs that go with that version.

The latest release of this document can be found [here](http://releases.k8s.io/release-1.1/docs/devel/collab.md).

Documentation for other releases can be found at releases.k8s.io.

See e2e-node-tests

Analytics