Commit Graph

550 Commits (c83a9246281d9eb6915e591673defc05d8590c00)

Author SHA1 Message Date
Random-Liu 35cabc370e Fix wrong permission bit for log file. 2016-09-02 14:05:18 -07:00
Vishnu kannan 59e14cf55b Increase logging level for e2e node services
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-02 14:05:09 -07:00
Random-Liu d36f7220da Change wrong name in perf config. 2016-09-02 13:48:10 -07:00
Kubernetes Submit Queue 0cdaf1028e Merge pull request #31912 from mtaufen/eviction-aftereach
Automatic merge from submit-queue

Move wait for pressure to subside to AfterEach 

so we still wait if the test part of the test for eviction order fails.
2016-09-02 13:15:36 -07:00
Zhou Fang bb0a0c0fe9 increase resource usage limit in node e2e test 2016-09-02 09:12:40 -07:00
Avesh Agarwal 4ba39b4722 Update mounttest container image version to 0.7 everywhere. 2016-09-02 09:03:11 -04:00
Kubernetes Submit Queue ca98482da9 Merge pull request #31945 from Random-Liu/prepull-common-test-image
Automatic merge from submit-queue

Add images used in common test into prepull image list.

Addresses https://github.com/kubernetes/kubernetes/issues/31774#issuecomment-243800830.

Fixes #31774, #31579.

This PR added all images in common test into the node e2e prepull list.
Mark P2 because this help get rid of image pulling flake.

@yujuhong
2016-09-02 01:36:55 -07:00
Random-Liu 76b35cf387 Add images used in common test into prepull image list. 2016-09-01 21:20:49 -07:00
Random-Liu 5420138378 Add automated docker performance validation. 2016-09-01 19:18:20 -07:00
Michael Taufen 3ad9a1e423 Move wait for pressure to subside to AfterEach so we still wait if the test for eviction order fails 2016-09-01 14:39:43 -07:00
Kubernetes Submit Queue d3270bce71 Merge pull request #31566 from ronnielai/container-gc
Automatic merge from submit-queue

Avoid disk eviction node e2e test using up all the disk space
2016-09-01 14:19:25 -07:00
Amey Deshpande 6a2201f410 Pick a specific GCI version by default on GCE.
Prior to this change, a K8s branch (master as well as release) was
pinned to a GCI milestone.  It would pick up the latest GCI release on
that milestone at the time of cluster creation.  The rationale was the
K8s users would automatically get the bug fixes in newer versions of
GCI.  However in practice, it makes the runtime environment
non-deterministic, and lack of continuous e2e tests mean we would run
into breakages sooner or later.

With this change, each K8s release will pick a specific version
of GCI by default (similar to how the Debian-based container-vm gets used).
Users can override the default version through KUBE_GCE_MASTER_IMAGE and
KUBE_GCE_NODE_IMAGE environment variables.

We expect the default GCI version will be updated relatively frequently stay
updated with newer GCI releases.  We can also automate the process to
automatically bump the hard-coded GCI version in future.
2016-08-31 17:26:00 -07:00
Michael Taufen af0a0c6367 Enable dynamic kubelet configuration for node e2e Jenkins serial tests
This commit enables the dynamic kubelet configuration feature for the
node e2e Jenkins serial tests, which is where the test for dynamic kubelet
configuration currently runs.
2016-08-31 13:54:57 -07:00
Michael Taufen a40b2cbe10 feature-gates flag plumbing for node e2e tests
This gives the node e2e test binary a --feature-gates flag that populates a
FeatureGates field on the test context. The value of this field is forwarded
to the kubelet's --feature-gates flag and is also used to populate the global
DefaultFeatureGate object so that statically-linked components see the same
feature gate settings as provided via the flag.

This means that you can set feature gates via the TEST_ARGS environment
variable when running node e2e tests. For example:

TEST_ARGS='--feature-gates=DynamicKubeletConfig=true'
2016-08-31 13:52:08 -07:00
Michael Taufen b3e9875fcc Wait before trying to start a new pod after the eviction test
This should stop the test from flaking while we figure out why there is
a mismatch between the reported pressure condition and the eviction
manager's decision to evict due to memory pressure.
2016-08-31 10:42:20 -07:00
Kubernetes Submit Queue 3b404bd213 Merge pull request #31651 from Random-Liu/move-host-info-around-test-result
Automatic merge from submit-queue

Node E2E: Move host info around test result.

Discussed offline with @yujuhong and @dchen1107. Currently, the node e2e result is organized as:
```
================================================================
Success Finished Host tmp-node-e2e-b6c375c7-e2e-node-containervm-v20160321-image Test Suite
{ginkgo-output}
{framework-error}
================================================================
```
This makes it painful to find which image the test is failing on. The `{ginkgo-output}` is usually quite long, so we have to scroll mouse up and down to find the host name.
This PR changes the test result to:
```
================================================================
Start Host tmp-node-e2e-b6c375c7-e2e-node-containervm-v20160321-image Test Suite
{ginkgo-output}
Success Finished Host tmp-node-e2e-b6c375c7-e2e-node-containervm-v20160321-image Test Suite
{framework-error}
================================================================
```
This is not perfect, but much better than before. We can easily find the host name under the ginkgo test result, like this:
```
================================================================
Start Host test-gci-dev-54-8743-3-0 Test Suite
Running Suite: E2eNode Suite
============================
Random Seed: 1472511489 - Will randomize all specs
Will run 0 of 131 specs

Running in parallel across 8 nodes

I0829 22:58:13.727764    1143 e2e_node_suite_test.go:98] Pre-pulling images so that they are cached for the tests.
I0829 22:58:28.562459    1143 e2e_node_suite_test.go:111] Node services started.  Running tests...
I0829 22:58:28.562477    1143 e2e_node_suite_test.go:116] Wait for the node to be ready

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
------------------------------
I0829 22:58:29.742596    1143 e2e_node_suite_test.go:136] Stopping node services...
I0829 22:58:29.742650    1143 services.go:673] Killing process 1423 (services) with -TERM
I0829 22:58:29.860893    1143 e2e_node_suite_test.go:141] Tests Finished


Ran 0 of 131 Specs in 16.185 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 131 Skipped 

Ginkgo ran 1 suite in 19.939034297s
Test Suite Passed

Success Finished Host test-gci-dev-54-8743-3-0 Test Suite
================================================================
```

In a following PR, I'll print the test result from different images into different files to make it more clear for debugging. Mark v1.4 because this helps us de-flake test.

/cc @kubernetes/sig-node
2016-08-30 23:08:41 -07:00
Random-Liu 2907d4019d Move host info around test result. 2016-08-30 21:31:04 -07:00
Random-Liu e7a1b4e16f Do not set stop-services=false for node e2e and add more logs. 2016-08-30 17:52:23 -07:00
Kubernetes Submit Queue 2b755dc480 Merge pull request #31716 from coufon/explicitly_delete_pods_in_node_perf_test
Automatic merge from submit-queue

Explicitly delete pods in node performance tests

This PR explicitly deletes all created pods at the end in node e2e performance related tests.

The large number of pods may cause namespace cleanup times out (in #30878), therefore we explicitly delete all pods for cleaning up.
2016-08-30 16:52:03 -07:00
Kubernetes Submit Queue 09e3fb355b Merge pull request #31629 from rmmh/fix-gubernator-line
Automatic merge from submit-queue

Only print "running gubernator.sh" when actually running it.
2016-08-30 16:10:18 -07:00
Zhou Fang 0167f74c6c explicitly delete pods in node perf tests 2016-08-30 15:18:37 -07:00
Kubernetes Submit Queue 12429e1690 Merge pull request #31664 from coufon/fix_perf_test_limit
Automatic merge from submit-queue

increase latency and resource limit accroding to test results

This PR increases the latency limit of node e2e density test according to previous test results.

Fixed #30878
2016-08-30 09:57:19 -07:00
Kubernetes Submit Queue cca6d7ddd9 Merge pull request #31634 from timstclair/gubernator
Automatic merge from submit-queue

Cleanup node failure message

Fix missing newline
2016-08-30 00:53:15 -07:00
Kubernetes Submit Queue 4ae5770162 Merge pull request #31370 from mtaufen/dynkubetest-update
Automatic merge from submit-queue

Capitalize feature name in test for dynamic kubelet configuration
2016-08-30 00:53:10 -07:00
Kubernetes Submit Queue 22fe385c13 Merge pull request #31653 from euank/kill-the-updates-for-the-nth-time
Automatic merge from submit-queue

test/node-e2e: Update CoreOS update disabling

Previously in this saga... #25004

This disables update-engine and locksmithd with ignition instead of
cloud-init so that they're really totally 100% disabled. Our ignition guy promises.

Pretty much every way of disabling them with cloud-init is mildly racy.

Fixes #31633 

I think @vishh can say "I told you so" after the comment on https://github.com/kubernetes/kubernetes/pull/30023#discussion-diff-73431324 .. he was right, but it turns out "stop" there doesn't really work either because of the mess that is cloud-init. Fortunately, converting our cloud-init to json and calling it "ignition" works quite well 😄 

Testing done: I ssh'd in and verified that yes, they're disabled. I didn't wait on the e2e tests to pass, so we'll let this PR check that.
2016-08-30 00:08:45 -07:00
Zhou Fang 483655a312 increase latency and resource limit accroding to test results 2016-08-29 19:05:52 -07:00
Phillip Wittrock 956501b1f0 Merge pull request #31555 from mtaufen/eviction-pod-name
Memory eviction test podName must be lowercase
2016-08-29 17:42:10 -07:00
Euan Kemp e58f3f61f8 test/node-e2e: Update CoreOS update disabling
This disables update-engine and locksmithd with ignition instead of
cloud-init so that they're really totally 100% disabled.

Pretty much every way of disabling them with cloud-init is mildly racy.

Fixes #31633
2016-08-29 16:11:40 -07:00
Tim St. Clair ba9aa1cb63
Cleanup node failure message 2016-08-29 13:23:56 -07:00
Ryan Hitchman 3551167d12 Only print "running gubernator.sh" when actually running it. 2016-08-29 12:16:30 -07:00
Angus Salkeld f785f3d3ef Clean up IPTables caps i.e.: sed -i "s/Iptables/IPTables/g" 2016-08-29 10:34:42 +10:00
Kubernetes Submit Queue e6df2db5c3 Merge pull request #31477 from freehan/cnibump
Automatic merge from submit-queue

bump cni to 9d5e6e6

fixes: #31348
2016-08-28 14:46:20 -07:00
Kubernetes Submit Queue 3c23d68b66 Merge pull request #31471 from timstclair/aa-beta
Automatic merge from submit-queue

[AppArmor] Promote AppArmor annotations to beta

Justification for promoting AppArmor to beta:

1. We will provide an upgrade path to GA
2. We don't anticipate any major changes to the design, and will continue to invest in this feature
3. We will thoroughly test it. If any serious issues are uncovered we can reevaluate, and we're committed to fixing them.
4. We plan to provide beta-level support for the feature anyway (responding quickly to issues).

Note that this does not include the yet-to-be-merged status annotation (https://github.com/kubernetes/kubernetes/pull/31382). I'd like to propose keeping that one alpha for now because I'm not sure the PodStatus is the right long-term home for it (I think a separate monitoring channel, e.g. cAdvisor, would be a better solution).

/cc @thockin @matchstick @erictune
2016-08-28 12:19:56 -07:00
bindata-mockuser 36d4c1cac2 Avoid disk eviction node e2e test using up all the disk space 2016-08-26 16:26:35 -07:00
Michael Taufen d0f84dd4e7 podName must be lowercase 2016-08-26 15:12:34 -07:00
Minhan Xia 69e540e634 bump cni to 9d5e6e6 2016-08-26 13:13:24 -07:00
Michael Taufen b9ad337bbd Rename ConnectToDockerOrDie to CreateDockerClientOrDie
This function does not actually attempt to connect to the docker daemon,
it just creates a client object that can be used to do so later. The old
name was confusing, as it implied that a failure to touch the docker daemon
could cause program termination (rather than just a failure to create the
client).
2016-08-26 11:21:07 -07:00
Michael Taufen aa1d273584 Wait for the memory pressure condition to be absent before finishing the memory eviction test 2016-08-26 10:15:28 -07:00
Dawn Chen 24e81af7b3 Revert "Avoid disk eviction node e2e test using up all the disk space" 2016-08-26 08:59:42 -07:00
Kubernetes Submit Queue cce68024e4 Merge pull request #31391 from ronnielai/container-gc
Automatic merge from submit-queue

Avoid disk eviction node e2e test using up all the disk space
2016-08-26 05:25:53 -07:00
Tim St. Clair a5b7212453
Promote AppArmor annotations to beta 2016-08-25 15:40:32 -07:00
Kubernetes Submit Queue 863dd10ae4 Merge pull request #30540 from Random-Liu/refactor-node-e2e-framework
Automatic merge from submit-queue

Node Conformance Test: Refactor node e2e framework

For #30122, #30174.
Based on #30348.

**Please only review the last 3 commits.**

This PR is part of our roadmap to package node conformance test.
The 1st commit is from #30348, it removed unnecessary dependencies in the node e2e test framework, because we've statically linked these dependencies.

The PR refactored the node e2e framework. Moving different utilities into different packages under `pkg/`.

We need to do this because:
1) Files like e2e_remote.go and e2e_build.go should only be used by runner, but they were compiled into the test suite because they were placed in the same package. The worst thing is that it will introduce some never used flags in the test suite binary.
2) Make the directory structure more clear. Only test should be placed in `test/e2e_node`, other utilities should be placed in different packages in `pkg/`.

@dchen1107 @vishh 
/cc @kubernetes/sig-node @kubernetes/sig-testing
2016-08-25 14:06:56 -07:00
Kubernetes Submit Queue a9a81219ef Merge pull request #31185 from coufon/log_throughput_benchmark
Automatic merge from submit-queue

add throughput in perf data and disable --cgroups-per-qos

This PR adds throughput data to printed perf data for benchmark. It also disables --cgrous-per-qos in jenkinds-benchmark.properties.
2016-08-25 04:05:20 -07:00
bindata-mockuser d0577e7c74 Avoid disk eviction node e2e test using up all the disk space 2016-08-24 22:07:58 -07:00
Random-Liu afb780d4ee Move utilities into different packages. Add local and remove runner. 2016-08-24 20:18:45 -07:00
Kubernetes Submit Queue f0462c4043 Merge pull request #31200 from ronnielai/test1
Automatic merge from submit-queue

Skip disk eviction test on non-supported images.
2016-08-24 20:06:07 -07:00
Kubernetes Submit Queue 1952986a34 Merge pull request #30348 from Random-Liu/remove-unnecessary-binary-copy
Automatic merge from submit-queue

Node Conformance Test: Remove unnecessary binary copy

For #30122, #30174.

This PR removed unnecessary dependencies in the node e2e test framework, because we've statically linked these dependencies.

@dchen1107 @vishh 
/cc @kubernetes/sig-node @kubernetes/sig-testing
2016-08-24 14:35:34 -07:00
Michael Taufen 79a0533c98 Capitalize feature name in test for dynamic kubelet configuration 2016-08-24 13:14:40 -07:00
Michael Taufen 9fdb3f291a Stop fd leak in e2e_service.go
Previously this code used http.Get and failed to read/close resp.Body, which
prevented network connection reuse, leaking fds. Now we use http.Head
instead, because its response always has a nil Body, so we don't have to
worry about read/close.
2016-08-24 09:15:25 -07:00
Michael Taufen 2e989a3c38 Revert "Merge pull request #31297 from mikedanese/revert-kubelet"
This reverts the revert of #30090 and #31282.
2016-08-24 09:06:12 -07:00
Kubernetes Submit Queue 9b0d57ff95 Merge pull request #31164 from coufon/skip_benchmark_in_jenkins_serial
Automatic merge from submit-queue

skip benchmark in jenkins serial test

This PR changes jenkins-serial.properties to skip benchmark tests (with tag [Benchmark]) in jenkins serial tests. It also add more comments in run_e2e.go.
2016-08-24 03:32:51 -07:00
Tim St. Clair a29ad353a6
Increase the AppArmor pod stop timeout to match the start timeout 2016-08-23 17:03:38 -07:00
Michael Taufen e780bb5fbd Enable dynamic kubelet configuration during tests 2016-08-23 07:42:44 -07:00
Michael Taufen 2413ec4494 Restart Kubelet if it exits during e2e tests 2016-08-23 07:42:44 -07:00
Michael Taufen 085df61204 Node e2e test for Dynamic Kubelet Configuration 2016-08-22 22:45:23 -07:00
Random-Liu e646dc6b9e Remove unnecessary code after e2e services are statically linked. 2016-08-22 20:51:24 -07:00
bindata-mockuser 7b70c23998 Make disk eviction test run correctly on all images. 2016-08-22 18:40:54 -07:00
Zhou Fang ac379b038e add throughput in perf data and disable --cgroups-per-qos 2016-08-22 16:04:32 -07:00
Zhou Fang c2d1a32597 skip benchmark in jenkins serial test 2016-08-22 14:19:40 -07:00
Random-Liu eca3dc6cd5 Extend serial test suite timeout to 3 hours. 2016-08-21 23:40:05 -07:00
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
Kubernetes Submit Queue 08b3c6829e Merge pull request #30718 from Random-Liu/wait-node-ready-before-start-test
Automatic merge from submit-queue

Node E2E: Wait for node ready before the node e2e test started.

Fixes https://github.com/kubernetes/kubernetes/issues/30252.

This PR makes node e2e test wait for exactly one node ready before running other test.

@ronnielai @mtaufen
2016-08-21 12:42:03 -07:00
Kubernetes Submit Queue 37f8559c22 Merge pull request #31039 from coufon/add_benchmark_to_jenkins
Automatic merge from submit-queue

Add benchmark to jenkins

This PR contains the following changes:

1. Add more tests in density benchmark test;
2. Add the peak value (100%) in latency and CPU usage statistic data;
3. Move the Ginkgo focus flag from e2e_remote.go to run_e2e.go;
4. Support running benchmark in run_e2e.go. The benchmark configuration file is an extension of image configuration. Each item requires additional GCE machine type (e.g. n1-standard-1, default value will be used if empty) and test names (Ginkgo focus regex strings). A test item is regarded as benchmark if the tests field is non-empty.
2016-08-21 08:32:39 -07:00
Random-Liu cb760a6ed4 Wait for node ready before the node e2e test started. 2016-08-20 17:54:23 -07:00
Random-Liu dd6584a606 Statically link apiserver to node e2e. 2016-08-20 17:41:34 -07:00
Kubernetes Submit Queue 98c4029275 Merge pull request #30200 from Random-Liu/move-namespace-controller-to-services
Automatic merge from submit-queue

Node Conformance Test: Move namespace controller to services

For #30122, #30174.
Based on #30116, #30198.

**Please only review the 3rd PR.**

This PR is part of our roadmap to package node conformance test.
The 1st commit is from #30116, which started e2e services in a separate process.
The 2nd commit is from #30198, it statically linked etcd into the node e2e framework.

The 3rd commit is new, it moved namespace controller into e2e services.

@dchen1107 @vishh 
/cc @kubernetes/sig-node @kubernetes/sig-testing
2016-08-20 14:19:40 -07:00
Zhou Fang b8ab0c50c5 add benchmark to jenkins 2016-08-20 09:43:42 -07:00
bindata-mockuser 1c47d9ddd0 Adding disk eviciton test to node e2e tests 2016-08-19 21:28:02 -07:00
Kubernetes Submit Queue e9815020eb Merge pull request #30475 from derekwaynecarr/pod-cgroup
Automatic merge from submit-queue

Unblock iterative development on pod-level cgroups

In order to allow forward progress on this feature, it takes the commits from #28017 #29049 and then it globally disables the flag that allows these features to be exercised in the kubelet.  The flag can be re-added to the kubelet when its actually ready.

/cc @vishh @dubstack @kubernetes/rh-cluster-infra
2016-08-19 21:06:48 -07:00
Kubernetes Submit Queue 237db0363a Merge pull request #31035 from ixdy/e2e-service-account
Automatic merge from submit-queue

When running inside docker, activate service account ASAP

Also switching to just use `GOOGLE_APPLICATION_CREDENTIALS`, rather than both.

x-ref https://github.com/kubernetes/test-infra/issues/318
2016-08-19 17:22:34 -07:00
Kubernetes Submit Queue 8c430c2fd7 Merge pull request #30476 from mtaufen/eviction_fix
Automatic merge from submit-queue

Wait for memory to be reclaimed after node_e2e MemoryEviction test

This helps prevent interference with other tests that run immediately after the MemoryEviction test.

/cc @Random-Liu @coufon
2016-08-19 17:22:05 -07:00
Jeff Grafton 8278d1c2ef When running inside docker, activate service account ASAP
Additionally, remove activation code everywhere else, since we do that
already in Jenkins.
2016-08-19 15:41:33 -07:00
Kubernetes Submit Queue b29023aa91 Merge pull request #30810 from mnshaw/gubernator-bugs
Automatic merge from submit-queue

Gubernator bug fixes: mv and GCS bucket permissions

Fixed issue where results file was not moved correctly, and also the permissions issue with the GCS bucket.

Will rebase after #30414 is merged

@timstclair
2016-08-19 14:34:56 -07:00
Zhou Fang 30eb6882f4 add peak (100%) lantecy and CPU usage in perf data 2016-08-19 14:33:38 -07:00
Zhou Fang 95eb9efb11 add more density benchmark tests 2016-08-19 14:03:21 -07:00
Michael Taufen a227ce42f2 Wait for memory to be reclaimed after node_e2e MemoryEviction test
This helps prevent interference with other tests that run immediately
after the MemoryEviction test.
2016-08-19 13:58:03 -07:00
Kubernetes Submit Queue 5f7875a9bc Merge pull request #30786 from coufon/add_time_series
Automatic merge from submit-queue

Add logging time series to benchmark test

This PR adds a new file benchmark_util.go which contains tool functions for benchmark (we can migrate benchmark related functions into it). 

The PR logs time series data for density benchmark test.
2016-08-19 13:41:29 -07:00
derekwaynecarr fde285cd8f Disable cgroups-per-qos flag until implementation is stabilized 2016-08-19 11:08:59 -04:00
Kubernetes Submit Queue 29e16d0174 Merge pull request #30913 from Random-Liu/fix-readiness-check
Automatic merge from submit-queue

Node E2E: Make readiness check handling process exits with 0 exit code.

As is mentioned by @mtaufen:
 "there is a problem with the way service `start` is currently implemented in test/e2e_node/e2e_service.go. If the Kubelet exits with status 0 before the health check completes, cmdErrorChan will be closed and, as a result, nil will be read from that channel, and you will return a nil error from `start`."

This PR changes the logic to:
1) If the err channel returns an error, return the error
2) If the err channel returns a nil, ignore it and continue checking readiness.
3) If the err channel is closed before readiness check succeeds, replace it with `blockCh` and continue checking readiness.

@mtaufen 
/cc @kubernetes/sig-node
2016-08-18 21:54:50 -07:00
Zhou Fang 58495b5214 add labels to perf dataset 2016-08-18 17:15:43 -07:00
Random-Liu 35aad1593f Remove fatal error in e2e_node_suite_test.go 2016-08-18 16:03:02 -07:00
Marie Shaw f7e2109b8b Fix GCS permissions and file moving bugs 2016-08-18 14:51:33 -07:00
Kubernetes Submit Queue c8591c710b Merge pull request #30414 from mnshaw/run-remote-tests
Automatic merge from submit-queue

Add GUBERNATOR flag which produces g8r link for node e2e tests

When you run 'make tests-e2e-node REMOTE=true GUBERNATOR=true' outputs a URL to view the test results on Gubernator. ~~Should work after my PR for Gubernator is merged.~~

@timstclair
2016-08-18 14:40:12 -07:00
Random-Liu 1904c86074 Make readiness check handling process exits with 0 exit code. 2016-08-18 13:51:40 -07:00
Zhou Fang f82746e038 move benchmark tag from context to it 2016-08-18 09:25:20 -07:00
Zhou Fang 5498130255 add logging time series data to benchmark tests 2016-08-18 09:20:40 -07:00
Random-Liu 90eb1f6de7 Move namespace controller into e2e services. 2016-08-18 02:18:07 -07:00
Kubernetes Submit Queue d989fa9751 Merge pull request #30568 from coufon/node_density_and_performance_test
Automatic merge from submit-queue

Add tag [benchmark] to node-e2e-test where performance limits are not verified

This PR adds a new tag "[benchmark]" to density and resource-usage node e2e test. The performance limits will not be verified at the end of benchmark tests.
2016-08-18 01:29:09 -07:00
Random-Liu 0f32e2ca30 Statically link etcd into node e2e. 2016-08-17 02:06:35 -07:00
Kubernetes Submit Queue 457a151fdb Merge pull request #30116 from Random-Liu/start-e2e-services-in-separate-process
Automatic merge from submit-queue

Node Conformance Test: Start e2e services in a separate process

For https://github.com/kubernetes/kubernetes/issues/30122.

This is the first step of https://github.com/kubernetes/kubernetes/issues/30174.

This PR added a `start-services-only` mode in the test suite, and start all e2e services in a separate process by run the test binary again in `start-services-only` mode.
2016-08-17 00:13:05 -07:00
Random-Liu 1c5bd5540e Stop throwing fatal error in buildGo to fix vm leak. 2016-08-16 18:12:21 -07:00
Marie Shaw d69252cbc2 Add GUBERNATOR flag for remote node e2e tests to produce gubernator link 2016-08-16 17:10:59 -07:00
Random-Liu 3910a66bb5 Add run-services-mode option, and start e2e services in a separate
process.
2016-08-15 14:45:01 -07:00
Tim St. Clair db6629228f
Add AppArmor E2E test 2016-08-15 13:25:22 -07:00
Zhou Fang f2af00f821 add benchmark test which does not verify limits 2016-08-14 18:55:46 -07:00
Kubernetes Submit Queue 8cc31b648e Merge pull request #30552 from ixdy/node-e2e-separate-project
Automatic merge from submit-queue

Run CI Jenkins node e2e tests in project k8s-jkns-ci-node-e2e

Fixes #27648.

If node VMs leak, they should only harm themselves, not the rest of Jenkins.

This also lets us do VM cleanup without worrying that we might accidentally delete important Jenkins VMs.

The `k8s-jkns-ci-node-e2e` should have the right ACLs in place already. The quota is at defaults, but I don't think we'll need to increase it at this point.
2016-08-13 18:18:44 -07:00
Kubernetes Submit Queue b47596a856 Merge pull request #30508 from timothysc/etcd304_cleanup
Automatic merge from submit-queue

Update core etcd references to use 3.0.4

This updates the core references to use 3.0.4. 

There are still legacy references in the code base that should be cleaned, or just removed but I'm reluctant to purge.  

/cc @kubernetes/sig-scalability
2016-08-13 02:18:03 -07:00
Jeff Grafton e399be0676 Run node e2e tests in project k8s-jkns-ci-node-e2e 2016-08-12 15:54:51 -07:00
Timothy St. Clair a0d177ca71 Update core etcd references to use 3.0.4 2016-08-12 13:39:07 -05:00
Kubernetes Submit Queue 90efb214ba Merge pull request #30482 from mtaufen/eviction_disruptive
Automatic merge from submit-queue

Label MemoryEviction [Disruptive]

This test has the potential to be disruptive.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30482)
<!-- Reviewable:end -->
2016-08-12 09:39:29 -07:00
Kubernetes Submit Queue cb16c07736 Merge pull request #30415 from dchen1107/test1
Automatic merge from submit-queue

Fixed misconfigured kubelet on containervm image for node-e2e.

Fixed #30412 to unblock @coufon's performance benchmark work.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30415)
<!-- Reviewable:end -->
2016-08-12 04:04:28 -07:00
Kubernetes Submit Queue 7457166290 Merge pull request #30485 from lavalamp/flake
Automatic merge from submit-queue

Turn on flake mitigation for the node e2e test



<!-- Reviewable:start -->
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30485)
<!-- Reviewable:end -->
2016-08-11 22:38:44 -07:00
Dawn Chen f21960a0f6 Disable qos related tests since the cgroup_root is not properly set for systemd nodes. 2016-08-11 17:54:23 -07:00
Daniel Smith b8dc23d0c1 Turn on flake mitigation for the node e2e test 2016-08-11 17:13:10 -07:00
Kubernetes Submit Queue 8c81c8340f Merge pull request #30333 from coufon/node_density_and_performance_test
Automatic merge from submit-queue

Add Time Series Data and Labels in Node density test

This pull requests contain:

1. Increase the pod creation latency limit according to test results;
2. Add 'GetResourceSeriesWithLabels' in 'resource_collector.go' to provide resource usage time series data;
3. Modify 'GetBasicCPUStats' in 'resource_collector.go' to make a copy of CPU usage array before sorting (otherwise time series data is disordered);
4. Add 'ResourceUsageToPerfDataWithLabels' and 'CPUUsageToPerfDataWithLabels' to attach labels to 'PerfData' for benchmark dashboard;

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30333)
<!-- Reviewable:end -->
2016-08-11 16:27:04 -07:00
Kubernetes Submit Queue dfcb649ee8 Merge pull request #30470 from vishh/node-e2e-owners
Automatic merge from submit-queue

Add Lantao Liu as node e2e reviewer.

Relieve pwittroc@ from node e2e maintenance

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/30470)
<!-- Reviewable:end -->
2016-08-11 15:50:11 -07:00
Michael Taufen 8575b73298 Label MemoryEviction [Disruptive] 2016-08-11 15:21:54 -07:00
Vishnu kannan 726788b003 add Lantao Liu as node e2e reviewer. Relieve pwittroc@ from node e2e maintenance
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-08-11 12:56:05 -07:00
Vishnu kannan 089439c30a collect cloud-init logs
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-08-11 12:53:08 -07:00
Dawn Chen cb22c41907 Fixed misconfigured kubelet on containervm image for node-e2e. 2016-08-11 11:19:30 -07:00
Zhou Fang ad81b6da80 migrate UsageToPerfDataWithLabels to perf_util.go 2016-08-11 11:18:00 -07:00
Zhou Fang 67a071eb6c add resource usage to perf data with labels for benchmark 2016-08-11 10:22:43 -07:00
Zhou Fang d7ba28b49f add getting time series resource usage data in resource_collector.go 2016-08-11 10:22:43 -07:00
Zhou Fang e052fd949b set larger pod creation latency limit 2016-08-11 10:22:43 -07:00
Zhou Fang e9c1cb9b78 make a copy when sort array using cpu usage 2016-08-11 10:22:43 -07:00
Kubernetes Submit Queue 6f7cc12c3c Merge pull request #29685 from bboreham/kill-setpgid-3
Automatic merge from submit-queue

Fix killing child sudo process in e2e_node tests

Fixes #29211; re-doing #29380 which was reverted due to cross-platform build failure #29669.

The context is we are trying to kill a process started as `sudo kube-apiserver`, but `sudo` ignores signals from the same process group. Applying `Setpgid` means the `sudo kill` process won't be in the same process group, so will not fall foul of this nifty feature.

~~I also took the liberty of removing some code setting `Pdeathsig` because it claims to be doing something  in the same area, but actually it doesn't do that at all.  The setting is applied to the forked process, i.e. `sudo`, and it means the `sudo` will get killed if we (`e2e_node.test`) die.  This (a) isn't what the comment says and (b) doesn't help because sending SIGKILL to the sudo process leaves sudo's child alive.~~

We do need to use the same 'hack' to access `Setpgid` as the `e2e_node.test` program gets built on Windows (although it doesn't run there).

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29685)
<!-- Reviewable:end -->
2016-08-11 05:38:17 -07:00
Jeff Grafton f9b6b70269 Use Kubekins service account in node e2e tests on Jenkins 2016-08-10 14:05:38 -07:00
Jeff Grafton 212ded55c1 Run node e2e pull VMs in a separate GCP project 2016-08-10 14:04:24 -07:00
Kubernetes Submit Queue eef8bfec23 Merge pull request #29815 from vishh/node-e2e-latest-gci
Automatic merge from submit-queue

Use latest GCI image based on a regex in Node e2e

This PR also makes it possible to run node e2e against multiple previous images, sorted by creation time. A regex for the image name can be used to instruct node e2e to identify test images.

Depends on #29577

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/29815)
<!-- Reviewable:end -->
2016-08-10 13:52:21 -07:00
Kubernetes Submit Queue 42553b92ae Merge pull request #28693 from mtaufen/eviction
Automatic merge from submit-queue

Node e2e memory eviction test

This tests memory evictions.
See related issue #28619 and fix to cadvisor https://github.com/google/cadvisor/pull/1380.

cc @vishh @derekwaynecarr @timstclair

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.kubernetes.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/28693)
<!-- Reviewable:end -->
2016-08-10 12:39:58 -07:00
Vishnu kannan e9034f1e0a make GCI the default node e2e test image. Fix bugs in runner
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-08-10 11:25:40 -07:00
Vishnu kannan 2f6514bd63 Node e2e can run tests against GCE images based on a regex.
It can run tests against multiple existing images that match a regex.
GCI images will be using a regex.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-08-10 11:24:54 -07:00
Timothy St. Clair 456c43c22d Update to shift etcd 2.2 references to use 3.0.3 2016-08-09 08:51:15 -05:00
Michael Taufen 736f1cb7c3 Node e2e memory eviction test
This test creates three pods with QoS of besteffort, burstable, and
guaranteed, respectively, which each contain a container that tries to
consume almost all the available memory at a rate of about 12Mi/10sec.

The expectation is that eviction will be initiated when the hard
memory.available<250Mi threshold is triggered, and that eviction will proceed
in the order of besteffort, then burstable. Since guaranteed pods should
only be evicted if something charged to the host uses more resources
than were reserved for it, we currently end the test when besteffort and
burstable have both been evicted.

Note that this commit also sets --eviction-hard=memory.available<250Mi
to enable eviction during tests.
2016-08-08 15:59:51 -07:00
bindata-mockuser baa5df2ada Using Flaky as opposed to FLAKY 2016-08-07 21:50:24 -07:00
Kubernetes Submit Queue 4d70d9f3de Merge pull request #30114 from Random-Liu/use-framework-report-dir
Automatic merge from submit-queue

Use report-dir in test framework instead.

We already have `report-dir` option in framework test context.
The node e2e framework should use it as well.

/cc @ronnielai
2016-08-05 23:31:28 -07:00
Kubernetes Submit Queue 1b1607a3e6 Merge pull request #30023 from euank/update-coreos-node-e2e
Automatic merge from submit-queue

node_e2e: Use upstream CoreOS image directly

.. and update it to the latest alpha

This will make updating the CoreOS image in the future much simpler since it won't involve project-copying, manual-baking, or so on.

cc @pwittrock @vishh @bboreham @yifan-gu
2016-08-05 22:55:38 -07:00
Kubernetes Submit Queue ea00445069 Merge pull request #29863 from ronnielai/system-test1
Automatic merge from submit-queue

Added an node e2e test for pod evictions due to disk pressure.

#29800
2016-08-05 21:34:11 -07:00
Kubernetes Submit Queue 4bb5fdc47f Merge pull request #29809 from Random-Liu/move-more-test-into-common
Automatic merge from submit-queue

E2E & Node E2E: Move configmap, docker_containers, downward_api, expansion and secrets test into common directory.

This is the 3rd part of #29494.

For #29081.
Based on #29092, #29806.

The first commit is squash of all dependent commits. Please only review the second commit.

The second PR added 17 lines.

@vishh @timstclair
2016-08-05 20:16:32 -07:00
Kubernetes Submit Queue 59c916c1d7 Merge pull request #29267 from bboreham/e2e-etcd-port
Automatic merge from submit-queue

For e2e_node tests tell etcd to listen on ports 2379 and 4001

This is the default for etcd2, but etcd3 only listens on 2379.
Specifying the ports keeps things consistent no matter which version the user has installed.

Fixes #29117
2016-08-05 18:44:33 -07:00
Ron Lai adf6b6ddf0 Added an node e2e test for pod evictions due to disk pressure. 2016-08-05 17:53:06 -07:00
Kubernetes Submit Queue d781225ac8 Merge pull request #30041 from Random-Liu/fix-node-name-in-node-e2e
Automatic merge from submit-queue

Node E2E: Move the node name initialization to first function of SynchronizedBeforeEach

Currently, we start e2e services in the first function of `SynchronizedBeforeEach` to make sure that we only start them once even we are running test in parallel test nodes.

However, e2e services require `NodeName`, but we initialize `NodeName` in the second function.

This PR moved the initialization logic into the first function, and shared the node name with all test nodes via the `SharedContext`.
2016-08-05 01:28:39 -07:00
Kubernetes Submit Queue 935a3e20c0 Merge pull request #30026 from coufon/node_density_and_performance_test
Automatic merge from submit-queue

Add density (batch pods creation latency and resource) and resource performance tests to `test-e2e-node' built for Linux only

This PR adds `+build linux' to density_test.go, resource_usage.go and resource_collector.go to last PR #29764. 

#29764 fails build because it depends on cgroup which can not be built for os other than Linux.
2016-08-05 00:20:31 -07:00
Random-Liu 1a33dffa17 Move configmap, docker_containers, downward_api, expansion and secrets
test into common directory.
2016-08-04 23:52:05 -07:00
Random-Liu 00b405d7e4 Use report-dir in test framework instead. 2016-08-04 23:40:17 -07:00
Random-Liu 7fd2319ca7 Change the node e2e junit file name to
junit_{image-name}{test-node-number}.xml
2016-08-04 15:50:35 -07:00
Zhou Fang 637e0f91ce add +build linux to density_test, resource_usage_test and resource_collector 2016-08-04 10:21:01 -07:00
Bryan Boreham bd8f4ff8cf Send SIGTERM on Pdeathsig to allow child to clean up
Also fix the comment to better describe the effect of this code.
2016-08-04 15:14:47 +01:00
Bryan Boreham 1307799a66 Run 'etcd2' if it exists, in preference to 'etcd'
This is to accommodate CoreOS, where 'etcd' is a very old version
2016-08-04 14:37:11 +01:00
Kubernetes Submit Queue 3e5b40d9a5 Merge pull request #29947 from ixdy/go-bindata-cross-image
Automatic merge from submit-queue

Install go-bindata in cross-build image

Another follow-up to #25584.

We need `go-bindata` to create `test/e2e/generated`, and downloading it with `go get` at build time is painful for a variety of reasons. We can just include it in the cross-build image and not worry about it, especially as it updates very infrequently.

This fixes `hack/update-generated-protobuf.sh` as well.

cc @jayunit100 @soltysh
2016-08-04 06:03:29 -07:00
Kubernetes Submit Queue c8ea7af912 Merge pull request #29890 from dchen1107/test1
Automatic merge from submit-queue

Resolve docker-daemon cgroup issue for both systemd and non-systemd node for node e2e tests

Fixed https://github.com/kubernetes/kubernetes/issues/29827

cc/ @coufon this should unblock your pr: #29764

I validated both containervm image and coreos image, and works as expected. 

This is also required for adding gci image to node e2e test infrastructure.
2016-08-04 01:17:01 -07:00
Random-Liu 13c8381dc4 Move the node name initialization to first function of
SynchronizedBeforeEach, so that we can pass right node
name when starting e2e services.
2016-08-03 18:14:53 -07:00
Euan Kemp 91015e0eff node_e2e: Use upstream CoreOS image directly 2016-08-03 13:39:55 -07:00
Jeff Grafton 42d2aca7bb Download go-bindata in unit/verify/node e2e Jenkins builds 2016-08-03 13:23:41 -07:00
Marek Grabowski 621a589b6d Revert "Add density (batch pods creation latency and resource) and resource performance tests to `test-e2e-node'" 2016-08-03 15:13:40 +02:00
Kubernetes Submit Queue e8c926047f Merge pull request #29806 from Random-Liu/improve-node-e2e-test-framework
Automatic merge from submit-queue

E2E & Node E2E: Improve node e2e test framework

This is first part of https://github.com/kubernetes/kubernetes/pull/29494.
I split #29494 into several PRs to help review. 

For https://github.com/kubernetes/kubernetes/issues/29081.

This PR changes TestContainerOutput to use the framework pod client:** so that all test using `TestContainerOutput` could be shared automatically. For example: https://github.com/kubernetes/kubernetes/blob/master/test/e2e/configmap.go#L198

@vishh @timstclair 
/cc @kubernetes/sig-node
2016-08-03 05:15:28 -07:00
Random-Liu 5c7ac701d3 Change TestContainerOutput to use the framework pod client. 2016-08-02 10:26:41 -07:00
Dawn Chen 5a64977d82 Resolve docker-daemon cgroup issue for both systemd and non-systemd node for node e2e tests. 2016-08-02 09:22:16 -07:00
Zhou Fang 04f83c79e7 change the package of uuid in resource_controller 2016-08-02 09:22:14 -07:00
Zhou Fang f3f3e965cc modify resource_collector.go to get container names of kubelet and docker dynamically 2016-08-02 09:20:04 -07:00
Zhou Fang df55e8fb70 Add density and resource performance test to test-node-e2e 2016-08-02 09:20:04 -07:00
k8s-merge-robot 61a6596fa1 Merge pull request #29818 from Random-Liu/add-serial-jenkins-job
Automatic merge from submit-queue

Node E2E: Add serial jenkins job.

This PR added a jenkins job for serial test. It will run all serial test one by one.

This will be useful for https://github.com/kubernetes/kubernetes/pull/29809.

@coufon @yujuhong @dchen1107 
/cc @kubernetes/sig-node
2016-08-02 05:34:36 -07:00
k8s-merge-robot 01cd7f326e Merge pull request #29621 from resouer/uuid
Automatic merge from submit-queue

Refactor uuid into its own pkg util/uuid

Continuing my work ref #15634

Anyone can review this if he/she wants.
2016-08-01 22:21:30 -07:00
Random Liu 654d3a07cb Skip Flaky, Slow and Serial test in proper jenkins job. 2016-08-02 02:13:50 +00:00
k8s-merge-robot f0fa9e588f Merge pull request #29813 from jayunit100/kill-repo-root-slb-2
Automatic merge from submit-queue

[minor] couple of quick cleanups for kill reporoot

quick fixes from last one,  cc @spxtr @ixdy follow on to  https://github.com/kubernetes/kubernetes/pull/25584
2016-07-29 21:42:42 -07:00
Harry Zhang c495397cae Refactor uuid into its own pkg 2016-07-30 00:07:02 -04:00
k8s-merge-robot 09b64180c2 Merge pull request #29536 from Random-Liu/add-exec-util-in-framework
Automatic merge from submit-queue

E2E & Node E2E: Add exec util in framework

For #29081.
Based on #29092 and #29494.

For first commit is a squashed commit of all old commits.
**The last 2 commits are new.**

This PR added exec util in framework, and moved `privileged.go` and `kubelet_etc_hosts` into `common` directory.

@vishh @timstclair 
/cc @kubernetes/sig-node
2016-07-29 20:25:12 -07:00
Random-Liu 08850cccca Add serial jenkins job. 2016-07-29 19:47:22 -07:00
k8s-merge-robot fe3dda1aeb Merge pull request #29092 from Random-Liu/make-node-e2e-parallel
Automatic merge from submit-queue

Node E2E: Make node e2e parallel

For https://github.com/kubernetes/kubernetes/issues/29081.
Fix https://github.com/kubernetes/kubernetes/issues/26215.
Based on https://github.com/kubernetes/kubernetes/pull/28807, https://github.com/kubernetes/kubernetes/pull/29020, will rebase after they are merged.

**Only the last commit is new.**

We are going to move more tests into the node e2e test. However, currently node e2e test only run sequentially, the test duration will increase quickly when we add more test.

This PR makes the node e2e test run in parallel so as to shorten test duration, so that we can add more test to improve the test coverage.

* If you run the test locally with `make test-e2e-node`, it will use `-p` ginkgo flag, which uses `(cores-1)` parallel test nodes by default.
* If you run the test remotely or in the Jenkin, the parallelism will be controlled by the environment variable `PARALLELISM`. The default value is `8`, which is reasonable for our test node (n1-standard-1).

Before this PR, it took  **833.592s** to run all test on my desktop.
With this PR, it only takes **234.058s** to run.

The pull request node e2e run with this PR takes **232.327s**.
The pull request node e2e run for other PRs takes **673.810s**.

/cc @kubernetes/sig-node
2016-07-29 18:38:29 -07:00
Random-Liu 749e0d0d72 Move privileged and kubelet_etc_hosts into common directory. 2016-07-29 18:29:43 -07:00
k8s-merge-robot 44115cd2e4 Merge pull request #29577 from vishh/gci-node-e2e-1
Automatic merge from submit-queue

Adding GCI to node e2e.

Depends on https://github.com/kubernetes/kubernetes/pull/29486
Adding the dev release as of now since stable and beta run docker v1.9.1
which is incompatible with kubelet.
2016-07-29 18:03:14 -07:00
jayunit100 4cd6bf42af [minor] couple of quick cleanups for kill reporoot 2016-07-29 20:22:28 -04:00
Random-Liu 9d48c76361 Make the node e2e test run in parallel. 2016-07-29 16:40:59 -07:00
Vishnu kannan 21873391e5 adding instance metadata for gci
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-07-29 15:25:46 -07:00
Vishnu Kannan 79d8868c77 Add instance metadata to image config file
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2016-07-29 15:25:46 -07:00
Vishnu kannan 6c43028a29 adding gci to node e2e
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-07-29 14:26:14 -07:00
Jay Vyas 6166083c78 kill repo-root : test/e2e/serviceloadbalancers.go
bindata and yaml, Gobindata automation
bindata utils for generating, go generate
match server version
gitignore for dirty, ca, rbase, KUBE_ROOT, buildfix
(rebased jul-25,29)
2016-07-29 14:35:19 -04:00
Bryan Boreham ba17bac843 Change process group when sending kill signal
Otherwise when the target process is running sudo it ignores the signal.
2016-07-27 18:11:58 +01:00
Erick Fejta 12d923ed15 Revert "Fix killing child sudo process in e2e_node tests" 2016-07-27 21:53:05 +05:30
k8s-merge-robot 03fe6b962c Merge pull request #29380 from bboreham/kill-setpgid
Automatic merge from submit-queue

Fix killing child sudo process in e2e_node tests

Fixes #29211.

The context is we are trying to kill a process started as `sudo kube-apiserver`, but `sudo` ignores signals from the same process group. Applying `Setpgid` means the `sudo kill` process won't be in the same process group, so will not fall foul of this nifty feature.

I also took the liberty of removing some code setting `Pdeathsig` because it claims to be doing something  in the same area, but actually it doesn't do that at all.  The setting is applied to the forked process, i.e. `sudo`, and it means the `sudo` will get killed if we (`e2e_node.test`) die.  This (a) isn't what the comment says and (b) doesn't help because sending SIGKILL to the sudo process leaves sudo's child alive.

I didn't use the "hack for linux-only" approach because I think `Setpgid` is available on all platforms that `e2e_node` builds on.
2016-07-27 03:18:15 -07:00
Bryan Boreham dbc59aad7c For e2e_node tests tell etcd to listen on ports 2379 and 4001
This is the default for etcd2, but etcd3 only listens on 2379.
Specifying the ports keeps things consistent no matter which
version the user has installed.
2016-07-27 11:16:40 +01:00
k8s-merge-robot 396254c11a Merge pull request #29486 from vishh/gci-node-e2e
Automatic merge from submit-queue

Make it possible to run node e2e with GCI.
2016-07-25 16:53:27 -07:00
Vishnu kannan d31608fcc8 Make it possible to run node e2e with GCI via make
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-07-25 12:21:37 -07:00
k8s-merge-robot c186afd46e Merge pull request #29122 from ronnielai/image-gc-1-1
Automatic merge from submit-queue

Syncing imaging pulling backoff logic

- Syncing the backoff logic in the parallel image puller and the sequential image puller to prepare for merging the two pullers into one.
- Moving image error definitions under kubelet/images
2016-07-25 11:43:22 -07:00
Random-Liu 7b27358068 Change SetupNode to True for node e2e docker validation test. 2016-07-22 00:07:09 -07:00
Bryan Boreham e5e7b60e9a Remove Pdeathsig code because it doesn't do what was intended
Pdeathsig is applied to the process we are starting, so that will get
killed if the e2e_node process dies, which isn't what we need.
2016-07-21 15:19:39 +01:00
Bryan Boreham a8d7e93d66 Change process group when sending kill signal
Otherwise when the target process is running sudo it ignores the signal.
2016-07-21 15:11:03 +01:00
k8s-merge-robot 80a59f0294 Merge pull request #29131 from Random-Liu/use-pre-pull
Automatic merge from submit-queue

Change some node e2e test to use the prepull image framework.

Fix https://github.com/kubernetes/kubernetes/issues/28868.

Node e2e test framework pre-pulls all images in [image_list.go](bc2f223f5a/test/e2e_node/image_list.go)

All node e2e test should use image from the "image_list". If a test needs new image, we should update the image_list to include the new image.

/cc @kubernetes/sig-node to notice people to use `image_list` when adding test. :)
2016-07-21 02:39:57 -07:00
Tim Hockin b829d4d4ef Merge pull request #26702 from joe2far/fix-broken-links
Fix broken warning image link in docs
2016-07-20 15:10:41 -07:00
Ron Lai ee4822e476 Moving image pulling errors under kubelet/images 2016-07-20 14:20:53 -07:00
k8s-merge-robot d1fba05a1b Merge pull request #29020 from Random-Liu/add-namespace-controller-in-node-e2e
Automatic merge from submit-queue

Start namespace controller in node e2e

Fix https://github.com/kubernetes/kubernetes/issues/28320.
Based on https://github.com/kubernetes/kubernetes/pull/28807, only the last 2 commits are new.

Before this PR, there was no namespace controller running in node e2e test infrastructure. We can not enable the [`delete-namespace`](f2ddd60eb9/test/e2e/framework/test_context.go (L109)) flag in the test framework.
So after the test running, there will be running pod left on the test node. This seems to be acceptable in our test infrastructure because we create an new instance each time.

However, in 1.4 we may want to provide part of the test as node conformance test to the user, they definitely don't want the test to leave tons of pods on their node after test running.

Currently, there is no easy way to only start namespace controller in kube-controller-manager (confirmed with @mikedanese), so in this PR I started a "uncontainerized" one in the test infrastructure.

This PR:
* Started the namespace controller in the node e2e test infrastructure and enable the automatic namespace deletion.
* Change the privileged test to use framework (@yujuhong), so that all node e2e tests are using the framework and test pods will be cleaned up by namespace controller.

/cc @kubernetes/sig-node
2016-07-20 09:24:26 -07:00
Random-Liu 691d24cc66 Change some node e2e test to use the prepull image framework. 2016-07-20 08:16:40 -07:00
Avesh Agarwal 0c8b7de238 Fixes a typo 2016-07-19 22:40:48 -04:00
k8s-merge-robot dca70739af Merge pull request #29110 from bboreham/clarify-healthcheck
Automatic merge from submit-queue

Don't repeat the program name in healthCheckCommand.String()

The name is in both `Path` and `Args[0]`, so start printing args at 1.
Also refactor to avoid an extra space character in the output.

I pondered whether `healthCheckCommand.String()` should check if the slice is empty, to avoid a panic, but it didn't check for `Cmd==nil` before.

Fixes #29107
2016-07-19 05:08:42 -07:00
k8s-merge-robot b3797b8a25 Merge pull request #28927 from Random-Liu/docker-validation-image-config-file
Automatic merge from submit-queue

Change the docker validation node e2e test to use gci-canary-test

This PR changed the continuous docker validation node e2e test to use the image config file introduced in https://github.com/kubernetes/kubernetes/pull/28708. @euank 

This PR also changed the gci image family from `gci-preview-test` to `gci-canary-test`. @wonderfly
2016-07-18 23:27:18 -07:00
Random-Liu fa8bd1d034 Change privileged test to use framework, so that all namespaces
will be cleaned up by namespace controller.
2016-07-18 19:06:59 -07:00
Random-Liu ad7e3c3053 Start namespace controller in node e2e test. 2016-07-18 19:06:59 -07:00
k8s-merge-robot af0835c0f4 Merge pull request #28807 from Random-Liu/e2e-node-e2e-share-test
Automatic merge from submit-queue

Node E2E: Make it possible to share test between e2e and node e2e

This PR is part of the plan to improve node e2e test coverage.
* Now to improve test coverage, we have to copy test from e2e to node e2e.
* When adding a new test, we have to decide its destiny at the very beginning - whether it is a node e2e or e2e.

This PR makes it possible to share test between e2e and node e2e. 
By leveraging the mechanism of ginkgo, as long as we can import the test package in the test suite, the corresponding `Describe` will be run to initialize the global variable `_`, and the test will be inserted into the test suite. (See https://github.com/onsi/composition-ginkgo-example)

In the future, we just need to use the framework to write the test, and put the test into `test/e2e/node`, then it will be automatically shared by the 2 test suites.

This PR:
1) Refactored the framework to make it automatically differentiate e2e and node e2e (Mainly refactored the `PodClient` and the apiserver client initialization).
2) Created a new directory `test/e2e/node` and make it shared by e2e and node e2e.
3) Moved `container_probe.go` into `test/e2e/node` to verify the change.

@kubernetes/sig-node 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-07-18 18:52:56 -07:00
Random-Liu e40e82bd5c Make it possible to share test between e2e and node e2e,
and make container probing test shared to validate.
2016-07-18 14:05:08 -07:00
k8s-merge-robot fa174bcdaf Merge pull request #29042 from dims/fixup-imports
Automatic merge from submit-queue

Use Go canonical import paths

Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-18 07:23:38 -07:00
Bryan Boreham 0991c04be1 Don't repeat the program name in healthCheckCommand.String()
The name is in both 'Path' and 'Args[0]', so start printing args at 1.
Also refactor to avoid an extra space character in the output.
2016-07-18 14:55:39 +01:00
Davanum Srinivas 2b0ed014b7 Use Go canonical import paths
Add canonical imports only in existing doc.go files.
https://golang.org/doc/go1.4#canonicalimports

Fixes #29014
2016-07-16 13:48:21 -04:00
k8s-merge-robot 5b027a5861 Merge pull request #28976 from coufon/debug_mirror_pod_test
Automatic merge from submit-queue

Fix a bug in mirror pod node e2e test.

Fixed a bug in test/e2e_node/mirror_pod_test.go. The function 'checkMirrorPodDisappear' returns nil even when the pod does not disappear. It should return a non-nil error. 

@Random-Liu
2016-07-15 17:39:16 -07:00
Buddha Prakash 5000e74664 Inject top level QoS cgroup creation in the Kubelet 2016-07-15 10:02:22 -07:00
joe2far 88b6d4ad36 Fix broken warning image link in docs 2016-07-15 10:44:58 +01:00
Daniel Smith 360f2eb927 Revert "Remove pod mutation for PVs with supplemental GIDs" 2016-07-14 17:47:46 -07:00
coufong 8a4c394ede Fix a bug in mirror pod node e2e test. 2016-07-14 16:59:08 -07:00
k8s-merge-robot be3175611c Merge pull request #28691 from wongma7/pv-gid-squash2
Automatic merge from submit-queue

Remove pod mutation for PVs with supplemental GIDs

Continuation of https://github.com/kubernetes/kubernetes/pull/27571 to bring the feature back without pod mutation
2016-07-14 11:22:04 -07:00
k8s-merge-robot 50172148e4 Merge pull request #25273 from ncdc/exec-sigwinch
Automatic merge from submit-queue

Support terminal resizing for exec/attach/run

```release-note
Add support for terminal resizing for exec, attach, and run. Note that for Docker, exec sessions
inherit the environment from the primary process, so if the container was created with tty=false,
that means the exec session's TERM variable will default to "dumb". Users can override this by
setting TERM=xterm (or whatever is appropriate) to get the correct "smart" terminal behavior.
```

Fixes #13585
2016-07-14 07:26:49 -07:00
Random-Liu b0d3f4c14a Change gci-preview-test to gci-canary-test. 2016-07-13 17:57:23 -07:00