Commit Graph

56 Commits (f32b390cf08a9afd9f9899e0d97a90eb162b32a8)

Author SHA1 Message Date
Matt Liggett 5bbb16381e update-bazel 2017-06-30 15:42:16 -07:00
Matt Liggett 8f7a26dfbe Add (node upgrade) etcd test. 2017-06-30 14:57:56 -07:00
Nick Sardo 642154a7a3 Do not fail on error when deleting ingress 2017-06-29 12:05:32 -07:00
Anthony Yeh 4ab06a6922
Skip Deployment upgrade test on 1.5 and earlier.
The test relies on implementation details and would need a rewrite
to work for older clusters.
2017-06-26 12:32:39 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu cde4772928 run ./root-rewrite-all-other-apis.sh, then run make all, pkg/... compiles 2017-06-22 11:30:52 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Andrzej Wasylkowski 38f175f115 Made WaitForReplicas take a "how long to wait" parameter instead of it being hardcoded. 2017-06-20 12:56:18 +02:00
Kubernetes Submit Queue 4f73e7a068 Merge pull request #46856 from wasylkowski/deleting-hpa
Automatic merge from submit-queue (batch tested with PRs 46835, 46856)

Made tests that create Horizontal Pod Autoscaler delete it after they are done.

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #46847

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-09 08:25:43 -07:00
Andrzej Wasylkowski abb5e6e709 Made tests that create Horizontal Pod Autoscaler delete it after they are done. 2017-06-06 19:59:14 +02:00
Matt Liggett 775f2ef9a0 Respect PDBs during GCE node upgrades.
Respect PDBs during node upgrades and add test coverage to the
ServiceTest upgrade test.  Modified that test so that we include pod
anti-affinity constraints and a PDB.
2017-06-01 17:58:45 -07:00
NickrenREN d4376599ba Cleanup: replace some hardcoded codes and remove unused functions 2017-04-25 09:38:25 +08:00
Kubernetes Submit Queue 2e677a5f80 Merge pull request #43956 from jeffvance/e2e-helpers
Automatic merge from submit-queue (batch tested with PRs 40055, 42085, 44509, 44568, 43956)

improve error handling in e2e helpers

**What this PR does / why we need it**:
Changes most of the volume related helper funcs to return error rather than calling `Expect`. This is a better programming practice, is consistent with Go and Kubernetes, and allows helper funcs that create multiple resources to perform cleanup.

```release-note
NONE
```
2017-04-17 15:39:12 -07:00
Chao Xu d4850b6c2b move pkg/api/v1/helpers.go to subpackage 2017-04-14 14:25:11 -07:00
Jeff Vance 0d81e4c87c improve error handling in e2e helpers by always returning error 2017-04-14 14:18:55 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Kubernetes Submit Queue 9f92832fad Merge pull request #43942 from wanghaoran1988/fix_43323
Automatic merge from submit-queue (batch tested with PRs 44447, 44456, 43277, 41779, 43942)

Clean up pre-ControllerRef compatibility logic

**What this PR does / why we need it**:

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #43323 

**Special notes for your reviewer**:
No
**Release note**:

```
NONE
```
2017-04-13 15:02:03 -07:00
Haoran Wang 866c599198 Clean up pre-ControllerRef compatibility logic 2017-04-07 14:09:23 +08:00
Kubernetes Submit Queue bbf15d5c33 Merge pull request #44191 from msau42/pv-upgrade-fix
Automatic merge from submit-queue (batch tested with PRs 44191, 44117, 44072)

Fix pv upgrade test failure

**What this PR does / why we need it**:
2 changes were made that broke the pv upgrade test:
1. MakePod() was changed so that the volume mount point is at /mnt/volume<n> instead of /mnt.  This change updates the path that the pod writes to.
2. The MakePod() call was changed to CreatePod(), which creates the pod and expects a long running pod.  But the upgrade test uses a short running pod, and the call to TestContainerOutput() will also create the pod. This changes it back to MakePod()


**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #44168

**Special notes for your reviewer**:

**Release note**:

NONE
2017-04-06 22:16:18 -07:00
Michelle Au 93e3fe8eb3 Fix pv upgrade test failure 2017-04-06 18:14:45 -07:00
Kris 90f8d62233 Make sure Teardown is called.
This will ensure that tests get a chance to clean up resources even if
setup failed part way through.
2017-04-05 11:09:24 -07:00
divyenpatel 6c20b67662 addressed jeffvance's review comments 2017-03-31 10:15:23 -07:00
Jon Cope 1622406284 Encapsulate test resources with selector/labels, add pvcConfig
Comments, log lines, exported MakePersistentVolume

Moved pv/pvcConfig assignment out of diskName check, nil ptrs and configs afterEach

change label/selector code to use k8s defined types from generic string:string maps

adjust for gce refactor
2017-03-28 17:16:59 -05:00
Kubernetes Submit Queue 18582a611a Merge pull request #43254 from krousey/upgrades
Automatic merge from submit-queue (batch tested with PRs 43254, 43255, 43184, 42509)

Fix nil-map panic in AppArmor skip
2017-03-16 19:02:19 -07:00
Kris 7ccca44137 Fix nil-map panic in AppArmor skip 2017-03-16 15:57:10 -07:00
Kubernetes Submit Queue 67a6c68d77 Merge pull request #43089 from krousey/upgrades
Automatic merge from submit-queue

Add guards for StatefulSet and AppArmor upgrade testing

This PR adds automated upgrade infrastructure to allow test suites to know what versions and node images are going to be testing and whether or not they should be skipped. It also adds a guard to prevent StatefulSets from being tested with versions prior to 1.5.0, and a guard to prevent AppArmor from running on distros other than gci and ubuntu.
2017-03-16 09:26:56 -07:00
Kris 3d05080982 Skip AppArmor tests on unsupported distros 2017-03-15 17:04:06 -07:00
Kris c0ecd93801 Change the skipping mechanism to be more generic
And convert StatefulSet's version skipping to the new API.
2017-03-15 17:04:06 -07:00
Anthony Yeh 0c015927c4 Fix Deployment upgrade test.
When the upgrade test operates on Deployments in a pre-1.6 cluster
(i.e. during the Setup phase), it needs to use the v1.5 deployment/util
logic. In particular, the v1.5 logic does not filter children to only
those with a matching ControllerRef.
2017-03-14 17:39:29 -07:00
Kris 111d9a3daf Skip StatefulSet tests for versions less than 1.5.0
PetSets were alpha in 1.4.0. They were renamed to StatefulSets and
graduated to beta starting in 1.5.0.
2017-03-14 12:12:49 -07:00
Kris 161d0f3ffd Add mechanism for upgrade tests to be skipped because of versions 2017-03-14 12:12:49 -07:00
Tim St. Clair 22d710f9bf
AppArmor cluster upgrade test 2017-03-07 17:15:53 -08:00
Kubernetes Submit Queue d6ae61c3c9 Merge pull request #42588 from krousey/upgrades
Automatic merge from submit-queue

Create "framework" per upgrade test

There were already a few tests just using the default framework
namespace instead of creating a new one. Also there are several
testing libraries that use the default framework's default namespace
as well. It's just easier this way.
2017-03-07 14:56:12 -08:00
Kubernetes Submit Queue 20c13c1564 Merge pull request #42555 from nicksardo/upgrade-ingress-flake
Automatic merge from submit-queue (batch tested with PRs 42080, 41653, 42598, 42555)

Fix resource cleanup in ingress_utils.go within e2e/framework

**What this PR does / why we need it**:
The GLBC is failing to delete resources during the etcd rollback tests and the e2e cleanup is leaking them. After a short while, tests are failing to create new resources. 
This PR addresses the e2e/framework's ability to delete GLBC-created resources and adds more logging.

**Which issue this PR fixes**:
Helps #38569 but does not completely close this flake

**Special notes for your reviewer**:
Resources were not being deleted because resource names were being truncated and then their ability to be deleted was determined by the entire cluster id existing in the name. Truncated names also have an extra '0' append to the end of their name (unknown origin). This PR tries to match on a common prefix. 

Minor changes were made to improve log readability. 

**Testing this PR**:
This was tested by running a master upgrade test and by adding a second forwarding-rule mid-run.  This forwarding rule referenced the same url-map used by the first forwarding-rule created by the GLBC. Therefore, the GLBC will be able to delete the forwarding-rule but not anymore L7 resources. This second forwarding rule's name was nearly identical to the first forwarding rule so that the cleanup code will find it. 

As you can see from the test run below, the cleanup code deleted all the resources that the GLBC could not.

```log
...
Mar  5 18:35:53.112: INFO: Monitoring glbc's cleanup of gce resources:
k8s-fws-e2e-tests-ingress-upgrsde-0px85-static-ip--5f38ac0e2420 (forwarding rule)
k8s-tps-e2e-tests-ingress-upgrade-0px85-static-ip--5f38ac0e2420 (target-https-proxy)
k8s-um-e2e-tests-ingress-upgrade-0px85-static-ip--5f38ac0e24260 (url-map)
k8s-be-32331--5f38ac0e2426f796 (backend-service)
k8s-be-32613--5f38ac0e2426f796 (backend-service)
k8s-be-32331--5f38ac0e2426f796 (http-health-check)
k8s-be-32613--5f38ac0e2426f796 (http-health-check)
k8s-ig--5f38ac0e2426f796 (instance-group)
k8s-ssl-e2e-tests-ingress-upgrade-0px85-static-ip--5f38ac0e2420 (ssl-certificate)

STEP: Performing final delete of any remaining resources
Mar  5 18:35:54.055: INFO: Deleting forwarding-rules: k8s-fws-e2e-tests-ingress-upgrsde-0px85-static-ip--5f38ac0e2420
Mar  5 18:36:06.945: INFO: Deleting target-https-proxies: k8s-tps-e2e-tests-ingress-upgrade-0px85-static-ip--5f38ac0e2420
Mar  5 18:36:14.301: INFO: Deleting url-map: k8s-um-e2e-tests-ingress-upgrade-0px85-static-ip--5f38ac0e24260
Mar  5 18:36:18.309: INFO: Deleting backed-service: k8s-be-32331--5f38ac0e2426f796
Mar  5 18:36:22.112: INFO: Deleting backed-service: k8s-be-32613--5f38ac0e2426f796
Mar  5 18:36:26.192: INFO: Deleting http-health-check: k8s-be-32331--5f38ac0e2426f796
Mar  5 18:36:29.846: INFO: Deleting http-health-check: k8s-be-32613--5f38ac0e2426f796
Mar  5 18:36:33.722: INFO: Deleting instance-group: k8s-ig--5f38ac0e2426f796
Mar  5 18:36:37.762: INFO: Deleting ssl-certificate: k8s-ssl-e2e-tests-ingress-upgrade-0px85-static-ip--5f38ac0e2420
STEP: No resources leaked.
Mar  5 18:36:46.441: INFO: Deleting addresses: e2e-tests-ingress-upgrade-0px85-static-ip
Mar  5 18:36:53.902: INFO: L7 controller failed to delete all cloud resources on time. timed out waiting for the condition
...
```
2017-03-06 17:16:17 -08:00
Kris a2eac2160e Create "framework" per upgrade test
There were already a few tests just using the default framework
namespace instead of creating a new one. Also there are several
testing libraries that use the default framework's default namespace
as well. It's just easier this way.
2017-03-06 11:32:23 -08:00
Nick Sardo 6bba665c81 Cleanup gce resources from ingress upgrade tests 2017-03-05 18:38:45 -08:00
Jerzy Szczepkowski 8e8df48bf8 Fixed too long name in HPA e2e upgrade test.
Fixed too long name in HPA e2e upgrade test.
2017-03-02 09:44:49 +01:00
Nick Sardo 9dc98f5296 upgrade tests: ingress/glbc 2017-03-01 11:52:55 -08:00
Kubernetes Submit Queue e93358fd6d Merge pull request #41615 from skriss/more-upgrade-tests
Automatic merge from submit-queue (batch tested with PRs 41234, 42186, 41615, 42028, 41788)

Additional upgrade e2e tests

**What this PR does / why we need it**: Add basic upgrade tests for DaemonSet and Job, and add "during upgrade" testing to ConfigMap test. Add a simple harness for testing upgrade tests.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*:

**Special notes for your reviewer**: continuation of #41296 @krousey please review, thanks

**Release note**: `NONE`
2017-02-28 00:34:06 -08:00
Steve Kriss 0ae2797992 added DaemonSet before/after upgrade test 2017-02-27 16:16:22 -08:00
Kenneth Owens 116eda0909 Implements an upgrade test for Job. Job common functionality is refactored into the framework package to allow for code sharing between e2e and upgrade tests. 2017-02-27 09:24:59 -08:00
Kubernetes Submit Queue 37acb8423c Merge pull request #42019 from msau42/pv_upgrade_test
Automatic merge from submit-queue (batch tested with PRs 41962, 42055, 42062, 42019, 42054)

PV upgrade test

**What this PR does / why we need it**:
This PR adds a PV upgrade test to the new upgrade test framework.  Before, this test had to be done manually.  Currently the upgrade test framework only works on the GCE environment, so I plan to add support for other providers later.  In order to write the test, I had to modify and refactor some volume test util libraries.  I reran the impacted tests to make sure they still passed.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
It's probably easier to review the two commits separately.  I split it up into the refactor changes, and the upgrade test changes.

**Release note**:

NONE


cc @saad-ali @krousey
2017-02-27 00:16:58 -08:00
Kubernetes Submit Queue f1fecc3074 Merge pull request #41964 from sttts/sttts-upgrade-test-sysctl
Automatic merge from submit-queue (batch tested with PRs 35408, 41915, 41992, 41964, 41925)

e2e/upgrade: add sysctls

Add sysctl upgrade tests.

How can these be effectively tested?
2017-02-26 18:07:59 -08:00
Matt Liggett 281a57aeaa Add etcd upgrade test. 2017-02-24 10:40:04 -08:00
Michelle Au 84d630c189 Add PV upgrade test 2017-02-23 21:05:12 -08:00
Dr. Stefan Schimanski ea52f59c8c e2e/upgrade: add sysctls 2017-02-23 10:49:41 +01:00
Michail Kargakis 58f6eb34d1 test: fetch updated deployment before finding new and old rss 2017-02-22 00:25:35 +01:00
Kubernetes Submit Queue 9ee2ab799f Merge pull request #41717 from kargakis/add-upgrade-test-logging
Automatic merge from submit-queue

Spew replica sets in any deployment upgrade test failure

Should help identifying whether the new replica set is considered as old after the upgrade (or maybe it's something else too).

For debugging https://github.com/kubernetes/kubernetes/issues/41518
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-e2e-gke-latest-upgrade-master/5/

The failure seems suspiciously related to https://github.com/kubernetes/kubernetes/issues/40415 but it may not be related at all too...

@kubernetes/sig-apps-bugs
2017-02-21 05:25:15 -08:00
Michail Kargakis 7b8f95080c Spew replica sets in any deployment upgrade test failure 2017-02-19 14:35:32 +01:00
Kubernetes Submit Queue 078238a461 Merge pull request #41221 from kow3ns/ss-upgrade-test
Automatic merge from submit-queue (batch tested with PRs 41548, 41221)

StatefulSet Upgrade Test

Adds StatefulSet upgrade tests and moves common functionality into the framework package. This removes the potential for cyclic dependencies while allowing for code reuse.
```release-note
NONE
```
2017-02-17 04:34:35 -08:00