Commit Graph

775 Commits (316876060ace20dc7230824cd284eeb1a621fa9c)

Author SHA1 Message Date
Kubernetes Submit Queue 4653a9b280 Merge pull request #41543 from dshulyak/decouple_remotecommand
Automatic merge from submit-queue (batch tested with PRs 44406, 41543, 44071, 44374, 44299)

Decouple remotecommand

Refactored unversioned/remotecommand to decouple it from undesirable dependencies:

- term package now is not required, and functionality required to resize terminal size can be plugged in directly in kubectl
- in order to remove dependency on kubelet package - constants from kubelet/server/remotecommand were moved to separate util package (pkg/util/remotecommand)
- remotecommand_test.go moved to pkg/client/tests module
2017-04-13 19:52:05 -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
Kubernetes Submit Queue b0a724173a Merge pull request #41659 from jeffvance/kubelet-wedge2
Automatic merge from submit-queue

add kubelet tests to verify host clean up

**What this PR does / why we need it**:
Increasingly we're seeing more failures in persistent volume e2e tests where pv tests are run in parallel with disruptive tests. The quick solution is to tag the pv tests as Flaky. This pr addresses one cause of the flakiness and adds a disruptive kubelet test.
Once this pr is shown to not produce flakes the [Flaky] tag for the "HostCleanup" tests will be removed in a separate pr.
+ Adds volume tests to _kubelet.go_ motivated by issues [31272](https://github.com/kubernetes/kubernetes/issues/31272) and [37657](https://github.com/kubernetes/kubernetes/issues/37657)
+ Addresses  reverted pr [41178](https://github.com/kubernetes/kubernetes/pull/41178) and negates the need for pr [41229](https://github.com/kubernetes/kubernetes/pull/41229)

**Which issue this PR fixes** 
Adds regression tests to cover issues: #31272 and #37657

**Special notes for your reviewer**:
It's possible that one of the new tests, which relies on the existence of _/usr/sbin/rpc.nfsd_ in the nfs-server pod, will not work in the GCI container env. If this turns out to be true then I will add a `SkipIfProviderIs("gke")` to the `It` block.

**Release note**:
```release-note
NONE
```
2017-04-13 07:12:15 -07:00
gmarek c73266b509 Make resource gatherer get data about etcd resource usage in kubemark setup 2017-04-13 15:22:36 +02:00
Dmitry Shulyak f50480c714 Decouple remotecommand client from term/kubelet dependencies
In order to move client/unversioned/remotecommand to client-go as a followup
for this change we have to decouple it from tons of dependencies
2017-04-13 15:56:40 +03:00
Kubernetes Submit Queue a820e7bcae Merge pull request #44397 from MrHohn/e2e-service-source-ip-timeout
Automatic merge from submit-queue

[e2e] Bump up pod deletion time for source pod IP test

From #44225.

Source pod IP e2e test is pretty flaky lately, and most of the failures seem to be timeout waiting for pod "kube-proxy-mode-detector" to disappear. Didn't found any other thing suspicious.

This PR bumps pod deletion timeout to DefaultPodDeletionTimeout, which is 3 minutes. Hopefully it will mitigate the flakes.

/assign @freehan 

**Release note**:

```release-note
NONE
```
2017-04-13 02:38:59 -07:00
Kubernetes Submit Queue f1c0c0a73c Merge pull request #42395 from nicksardo/gce-src-ranges
Automatic merge from submit-queue

Adding load balancer src cidrs to GCE cloudprovider

**What this PR does / why we need it**:
As of January 31st, 2018, GCP will be sending health checks and l7 traffic from two CIDRs and legacy health checks from three CIDS. This PR moves them into the cloudprovider package and provides a flag for override.

Another PR will need to be address firewall rule creation for external L4 network loadbalancing #40778

**Which issue this PR fixes**
Step one of #40778
Step one of https://github.com/kubernetes/ingress/issues/197

**Release note**:
```release-note
Add flags to GCE cloud provider to override known L4/L7 proxy & health check source cidrs
```
2017-04-12 19:57:43 -07:00
Timothy St. Clair d401627a10 Try in cluster config when input KubeConfig is empty 2017-04-12 20:33:10 -05:00
Jeff Vance c4b14e0eaa rebase-1 2017-04-12 11:15:50 -07:00
Jeff Vance a192edd87f replace c.Core with c.CoreV1; DeletePodWithWait check 2017-04-12 11:15:50 -07:00
Zihong Zheng 07213b6dff [e2e] Bump up pod deletion time for source pod IP test 2017-04-12 09:16:47 -07:00
Kubernetes Submit Queue de1cee38bf Merge pull request #35284 from jsafrane/fix-class-tests
Automatic merge from submit-queue

Add test for provisioning with storage class

This PR re-introduces e2e test for dynamic provisioning with storage classes.

It adds the same test as it was merged in PR #32485 with an extra patch adding region to AWS calls. It works well on my AWS setup, however I'm using shared company account and I can't run kube-up.sh and run the tests in the "official" way.

@zmerlynn, can you please try to run tests that led to #34961?

@justinsb, you're my AWS guru, would there be a way how to introduce fully initialized AWS cloud provider into e2e test framework? It would simplify everything. GCE has it there, but it's easier to initialize, I guess. See https://github.com/kubernetes/kubernetes/blob/master/test/e2e/pd.go#L486 for example - IMO tests should not talk to AWS directly.
2017-04-07 11:40:34 -07:00
Kubernetes Submit Queue ad3e0903f3 Merge pull request #43804 from Crazykev/wrong-err
Automatic merge from submit-queue

fix wrong error return

Signed-off-by: Crazykev <crazykev@zju.edu.cn>



**What this PR does / why we need it**: The err return here is wrong, correct it.

**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**:

**Release note**:

```release-note
```
2017-04-07 05:06:39 -07:00
Haoran Wang 866c599198 Clean up pre-ControllerRef compatibility logic 2017-04-07 14:09:23 +08:00
Kubernetes Submit Queue aa1bd2b3e0 Merge pull request #43818 from kargakis/reduce-deployment-replicas
Automatic merge from submit-queue (batch tested with PRs 41189, 43818)

Reduce deployment replicas in e2e tests

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

There are still two tests that run multiple replicas (testScaledRolloutDeployment, testIterativeDeployments), we may want to revisit them at some point.
2017-04-06 15:12:21 -07:00
Kubernetes Submit Queue c2f3c483a1 Merge pull request #42363 from copejon/extract-volume-utils
Automatic merge from submit-queue

Extract e2e utility code into framework

**What this PR does / why we need it**:
There's a growing dependency on Volume e2e utilities related to creating / test against NFS volumes.  For this reason, it's useful to relocate the relevant functions to the `framework` pkg.   Doing so makes these utility functions available to e2e tests outside the `e2e` package.


This PR only moves code from the `e2e` package to `framework` and handle the relevant changes in calls.  It does not change any logic.  


```release-note
NONE
```

@jingxu97 I think there's value here in reducing duplicate code in the `common` package, given that these functions have been copied down to it.  However, there's been some divergence.  Can you PTAL and let me know if there's any reason we can't remove the duplicate `common` code?

cc @jeffvance
2017-04-06 09:55:50 -07:00
Jan Safranek a327302200 e2e tests should be multizone aware
Pass MULTIZONE=true env. variable to e2e test framework.
2017-04-06 13:28:29 +02:00
Michail Kargakis 5f6a8c8d23
Reduce deployment replicas in e2e tests
Signed-off-by: Michail Kargakis <mkargaki@redhat.com>
2017-04-06 12:54:43 +02:00
Kubernetes Submit Queue 2d023d967d Merge pull request #44066 from marun/fed-improve-e2e-setup
Automatic merge from submit-queue (batch tested with PRs 44097, 42772, 43880, 44031, 44066)

[Federation] Improve e2e test setup

This PR improves federation e2e test setup:

 - reuses e2e framework setup (``NewDefaultFramework``) instead of duplicating it
 - ensures ``FederationAfterEach`` is called if an error occurs in ``FederationBeforeEach`` (as per the [example](https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/framework.go#L161) of the e2e framework)
 - skips creation of a test namespace in the hosting cluster (not used for a federation e2e test)

cc: @kubernetes/sig-federation-pr-reviews @kubernetes/sig-testing-pr-reviews
2017-04-05 16:41:25 -07:00
Maru Newby 6170378764 Configurably skip creation of namespace on e2e setup 2017-04-04 17:42:49 -07:00
Jon Cope ecca32641f Add skipUnlessNodeOS is GCI 2017-04-04 15:38:29 -05:00
Jon Cope cef9edcdee Extract volume test utils into framework.
Moved remaining util functions

moved cinder specific function back to volumes.go, will have to be extracted later when a cinder e2e package is created.

remove dupe code from common/volume.go

Moved [Volume] tags to KubeDescribe
2017-04-04 14:50:37 -05:00
Maciej Pytel 1c9f64c760 e2e for cluster-autoscaler unhealthy cluster handling
Moved testUnderNetworkFailure function to framework,
so it can be reused.
2017-04-04 14:36:44 +02:00
Marcin Wielgus 3f7bf0206f Extract commonly used functions from e2e/resize_nodes.go to e2e/framework 2017-04-04 00:01:20 +02:00
Wojciech Tyczynski dea98cbdd0 Don't run preserve pod IP test in userspace mode 2017-04-03 08:15:22 +02:00
Kubernetes Submit Queue 25a87fa19c Merge pull request #40804 from runcom/prepull-cri
Automatic merge from submit-queue

test/e2e_node: prepull images with CRI

Part of https://github.com/kubernetes/kubernetes/issues/40739

- This PR builds on top of #40525 (and contains one commit from #40525)
- The second commit contains a tiny change in the `Makefile`.
- Third commit is a patch to be able to prepull images using the CRI (as opposed to run `docker` to pull images which doesn't make sense if you're using CRI most of the times)

Marked WIP till #40525 makes its way into master

@Random-Liu @lucab @yujuhong @mrunalp @rhatdan
2017-04-01 03:08:35 -07:00
Antonio Murdaca 2634f57f7f
test/e2e_node: prepull images with CRI
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-04-01 10:18:56 +02:00
Kubernetes Submit Queue 7a03a095d2 Merge pull request #42667 from vmware/e2eTestUpdate-v5
Automatic merge from submit-queue (batch tested with PRs 42667, 43923)

Adding test to perform volume operations storm

**What this PR does / why we need it**:
Adding new test to perform volume operations storm
Test Steps
1. Create storage class for thin Provisioning.
2. Create 30 PVCs using above storage class in annotation, requesting 2 GB files.
3. Wait until all disks are ready and all PVs and PVCs get bind. (**CreateVolume** storm)
4. Create pod to mount volumes using PVCs created in step 2. (**AttachDisk** storm)
5. Wait for pod status to be running.
6. Verify all volumes accessible and available in the pod.
7. Delete pod.
8. wait until volumes gets detached. (**DetachDisk** storm)
9. Delete all PVCs. This should delete all Disks. (**DeleteVolume** storm)
10. Delete storage class.

This test will help validate issue reported at https://github.com/vmware/kubernetes/issues/71

**Which issue this PR fixes**
fixes #

**Special notes for your reviewer**:
executed test on 1.5.3 release with `VOLUME_OPS_SCALE` set to `5`
Will execute test with the changes made on PR - https://github.com/kubernetes/kubernetes/pull/42422, with the  `VOLUME_OPS_SCALE` set to `30`

**Release note**:

```release-note
None
```

cc: @abrarshivani @BaluDontu @tusharnt @pdhamdhere @luomiao @kerneltime
2017-03-31 15:11:17 -07:00
divyenpatel 6c20b67662 addressed jeffvance's review comments 2017-03-31 10:15:23 -07:00
Kubernetes Submit Queue c608e700b4 Merge pull request #43891 from porridge/2typos
Automatic merge from submit-queue

Fix a couple of typos.
2017-03-31 05:51:56 -07:00
Michail Kargakis e1e2d702c4 Log replica sets/pods for recreate test 2017-03-31 10:25:48 +02:00
Marcin Owsiany f73dce8fb5 Fix two typos. 2017-03-31 08:57:11 +02:00
Haoran Wang 0b3a6c80ca Initial the scheduler priority test 2017-03-30 10:54:27 +08:00
Kubernetes Submit Queue 8a62e2a4d6 Merge pull request #43820 from krousey/upgrades
Automatic merge from submit-queue (batch tested with PRs 42617, 43247, 43509, 43644, 43820)

Adding a SSH tunnel check to GKE upgrades

**What this PR does / why we need it**: After an upgrade, it takes some time fore the master to re-establish SSH tunnels to the nodes. This adds a wait for GKE since it runs in this configuration.

**Which issue this PR fixes**: fixes #43611, #43612
2017-03-29 16:05:28 -07:00
Kris f6c1993b84 Adding a SSH tunnel check to GKE upgrades 2017-03-29 11:37:29 -07:00
Crazykev 6f86cd1a32 fix wrong error return
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2017-03-29 20:44:10 +08: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
Wojciech Tyczynski 2e3cd93fc8 Fix problems of not-starting image pullers 2017-03-28 11:05:57 +02:00
Bowei Du d3e4959104 Use ping to ip instead of wget google.com in net connectivity check
This is a flakey test and this commit reduces the number of dependent
systems involved with the flake.
2017-03-27 17:18:55 -07:00
Kubernetes Submit Queue c81e99d98d Merge pull request #41728 from vmware/e2eTestsUpdate-v3
Automatic merge from submit-queue (batch tested with PRs 41728, 42231)

Adding new tests to e2e/vsphere_volume_placement.go

**What this PR does / why we need it**:
Adding new tests to e2e/vsphere_volume_placement.go

Below is the tests description and test steps.

**Test Back-to-back pod creation/deletion with different volume sources on the same worker node**

1. Create volumes - vmdk2, vmdk1 is created in the test setup.
2. Create pod Spec - pod-SpecA with volume path of vmdk1 and NodeSelector set to label assigned to node1.
3. Create pod Spec - pod-SpecB with volume path of vmdk2 and NodeSelector set to label assigned to node1.
4. Create pod-A using pod-SpecA and wait for pod to become ready.
5. Create pod-B using pod-SpecB and wait for POD to become ready.
6. Verify volumes are attached to the node.
7. Create empty file on the volume to make sure volume is accessible. (Perform this step on pod-A and pod-B)
8. Verify file created in step 5 is present on the volume. (perform this step on pod-A and pod-B)
9. Delete pod-A and pod-B
10. Repeatedly (5 times) perform step 4 to 9 and verify associated volume's content is matching.
11. Wait for vmdk1 and vmdk2 to be detached from node.
12. Delete vmdk1 and vmdk2

**Test multiple volumes from different datastore within the same pod**

1. Create volumes - vmdk2 on non default shared datastore.
2. Create pod Spec with volume path of vmdk1 (vmdk1 is created in test setup on default datastore) and vmdk2.
3. Create pod using spec created in step-2 and wait for pod to become ready.
4. Verify both volumes are attached to the node on which pod are created. Write some data to make sure volume are accessible.
5. Delete pod.
6. Wait for vmdk1 and vmdk2 to be detached from node.
7. Create pod using spec created in step-2 and wait for pod to become ready.
8. Verify both volumes are attached to the node on which PODs are created. Verify volume contents are matching with the content written in step 4.
9. Delete POD.
10. Wait for vmdk1 and vmdk2 to be detached from node.
11. Delete vmdk1 and vmdk2

**Test multiple volumes from same datastore within the same pod**

1. Create volumes - vmdk2, vmdk1 is created in testsetup
2. Create pod Spec with volume path of vmdk1 (vmdk1 is created in test setup) and vmdk2.
3. Create pod using spec created in step-2 and wait for pod to become ready.
4. Verify both volumes are attached to the node on which pod are created. Write some data to make sure volume are accessible.
5. Delete pod.
6. Wait for vmdk1 and vmdk2 to be detached from node.
7. Create pod using spec created in step-2 and wait for pod to become ready.
8. Verify both volumes are attached to the node on which PODs are created. Verify volume contents are matching with the content written in step 4.
9. Delete POD.
10. Wait for vmdk1 and vmdk2 to be detached from node.
11. Delete vmdk1 and vmdk2


**Which issue this PR fixes** 
fixes #

**Special notes for your reviewer**:
Executed tests against K8S v1.5.3 release 

**Release note**:

```release-note
NONE
```

cc: @kerneltime @abrarshivani @BaluDontu @tusharnt @pdhamdhere
2017-03-27 11:54:25 -07:00
Kubernetes Submit Queue 5c2a8c252c Merge pull request #43641 from krousey/upgrades
Automatic merge from submit-queue

Better logging for PVC flakes

Addresses some logging ambiguities in https://github.com/kubernetes/kubernetes/issues/43610, but does not fix it.
2017-03-27 10:43:42 -07:00
Kubernetes Submit Queue d7332315b0 Merge pull request #42959 from smarterclayton/test_clean
Automatic merge from submit-queue (batch tested with PRs 42998, 42902, 42959, 43020, 42948)

Delete host exec pods rapidly
2017-03-25 17:17:25 -07:00
Nick Sardo baab99b823 Adding load balancer src ranges; support flag overrides 2017-03-24 16:36:19 -07:00
Madhusudan.C.S bec6b64db3 Add the ability to customize federation system namespace in e2e turn up scripts. 2017-03-24 14:42:50 -07:00
Kris d9a84e624c Better logging for PVC flakes 2017-03-24 14:25:25 -07:00
Kubernetes Submit Queue a34da7644f Merge pull request #42551 from shashidharatd/e2e-tests
Automatic merge from submit-queue (batch tested with PRs 42237, 42297, 42279, 42436, 42551)

Cleanup federation_util.go in e2e/framework

The only function GetValidDNSSubdomainName in  test/e2e/framework/federation_util.go is no longer used for some time now. so cleaning it up.

cc @kubernetes/sig-federation-pr-reviews @madhusudancs
2017-03-24 14:16:28 -07:00
Kubernetes Submit Queue 694088b3ad Merge pull request #42279 from copejon/fix-pvc-poll-error-message
Automatic merge from submit-queue (batch tested with PRs 42237, 42297, 42279, 42436, 42551)

Reword PVC polling message to log a more readable message.

**What this PR does / why we need it**:
Previous message used to report an error is misleading and poorly written.  This PR changes the log to be more readable.

```release-note
NONE
```
2017-03-24 14:16:25 -07:00
krousey 638044a1ec Revert "Fix the ETCD env vars for downgrade" 2017-03-23 15:29:13 -07:00
Kris da74b86b99 Fix the ETCD env vars for downgrade 2017-03-22 11:25:42 -07:00
Kris 723d301b47 Add ETCD env vars for downgrade 2017-03-21 15:13:50 -07:00
divyenpatel 57754d6c41 updated test/e2e/pvutil.go to use c.CoreV1() 2017-03-19 11:53:40 -07:00
divyenpatel 608638cb52 fixed common funcs to add support for new tests
added new tests to vsphere_volume_placement.go

addressed jeffvance's review comments
2017-03-19 11:53:30 -07:00
Anthony Yeh fa23729a6d kubectl: Use v1.5-compatible ownership logic when listing dependents.
In particular, we should not assume ControllerRefs are necessarily set.
However, we can still use ControllerRefs that do exist to avoid
interfering with controllers that do use it.
2017-03-16 12:28:38 -07:00
Kubernetes Submit Queue 0afdcfcaf6 Merge pull request #43114 from enisoc/deployment-upgrade-test
Automatic merge from submit-queue

Fix Deployment upgrade test.

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

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.

**Which issue this PR fixes**:

Fixes #42738

**Special notes for your reviewer**:

**Release note**:
```release-note
```
cc @kubernetes/sig-apps-pr-reviews
2017-03-15 07:03:19 -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
Anirudh 7698196fa5 Add a timeout to allow replacement pod to become ready 2017-03-14 17:09:39 -07:00
Kubernetes Submit Queue 1221779b18 Merge pull request #43018 from nicksardo/ingress-upgrade-cleanup-flake
Automatic merge from submit-queue (batch tested with PRs 43018, 42713)

Log instead of fail on GLBCs tendency to leak resources

**What this PR does / why we need it**:
Stops upgrade tests from flaking because the GLBC does not cleanup all resources due to a race condition.

**Which issue this PR fixes**: fixes #38569

**Special notes for your reviewer**:
To be reviewed by @mml 

```release-note
NONE
```
2017-03-14 15:59:18 -07:00
Kubernetes Submit Queue 42cdb052b6 Merge pull request #42968 from timothysc/sched_e2e_breakout
Automatic merge from submit-queue (batch tested with PRs 42775, 42991, 42968, 43029)

Initial breakout of scheduling e2es to help assist in assignment and refactoring

**What this PR does / why we need it**:
This PR segregates the scheduling specific e2es to isolate the library which will assist both in refactoring but also auto-assignment of issues.  

**Which issue this PR fixes** 
xref: https://github.com/kubernetes/kubernetes/issues/42691#issuecomment-285563265

**Special notes for your reviewer**:
All this change does is shuffle code around and quarantine.  Behavioral, and other cleanup changes, will be in follow on PRs.  As of today, the e2es are a monolith and there is massive symbol pollution, this 1st step allows us to segregate the e2es and tease apart the dependency mess. 

**Release note**:

```
NONE
```

/cc @kubernetes/sig-scheduling-pr-reviews @kubernetes/sig-testing-pr-reviews @marun @skriss 

/cc @gmarek - same trick for load + density, etc.
2017-03-14 13:52:43 -07:00
Anirudh bcc73dbe1a Fix StatefulSet apps flakes 2017-03-14 02:44:55 -07:00
Timothy St. Clair 6cc40678b6 Initial breakout of scheduling e2es to help assist in both assignment
and refactoring.
2017-03-13 22:34:57 -05:00
Nick Sardo 3e85c0f758 Log instead of fail on GLBCs tendency to leak resources 2017-03-13 15:31:03 -07:00
Clayton Coleman e3ca9570a5
Delete host exec pods rapidly
For some tests this makes namespace deletion faster (we poll for
resources at 1/2 their innate termination grace period), thus speeding
up the test.
2017-03-12 00:43:23 -05:00
shashidharatd a14f8dc346 auto generated bazel build files 2017-03-11 01:39:56 +05:30
shashidharatd 662f0ef531 Add framework for federation upgrade tests 2017-03-11 01:39:56 +05:30
shashidharatd 4443a1b40d Move few reusable functions to upgrade_utils.go 2017-03-11 01:39:56 +05:30
Kubernetes Submit Queue 4ff0af821a Merge pull request #42879 from jsafrane/test-pod-logs
Automatic merge from submit-queue

e2e test: Log container output on TestContainerOutput error

When a pod started with TestContainerOutput or TestContainerOutputRegexp
fails from unknown reason, we should log all output of all its containers
so we can analyze what went wrong.

This would help us to see what wrong in https://github.com/kubernetes/kubernetes/issues/40811 - a container is running there for 3 minutes and dies and we want to see what it did for these 3 minutes.

```release-note
NONE
```
2017-03-10 06:13:44 -08:00
Jan Safranek bc06c636d1 e2e test: Log container output on TestContainerOutput error
When a pod started with TestContainerOutput or TestContainerOutputRegexp
fails from unknown reason, we should log all output of all its containers
so we can analyze what went wrong.
2017-03-10 10:08:57 +01:00
Kubernetes Submit Queue 4540674b04 Merge pull request #42758 from krousey/downgrades
Automatic merge from submit-queue (batch tested with PRs 42734, 42745, 42758, 42814, 42694)

Implement automated downgrade testing.

Node version cannot be higher than the master version, so we must
switch the node version first. Also, we must use the upgrade script
from the appropriate version for GCE.
2017-03-09 15:06:56 -08:00
Kris cc84e0895a Implement automated downgrade testing.
Node version cannot be higher than the master version, so we must
switch the node version first. Also, we must use the upgrade script
from the appropriate version for GCE.
2017-03-09 12:45:20 -08:00
David Ashpole 3806d386df use default timeout for deletion 2017-03-08 14:40:19 -08:00
Kubernetes Submit Queue 1402cc588f Merge pull request #42681 from yujuhong/fix_restart
Automatic merge from submit-queue (batch tested with PRs 42652, 42681, 42708, 42730)

e2e: fix restarting the apiserver

The string used to match the image name of the apiserver (e.g., `gcr.io/google_containers/kube-apiserver:3be...`),
but this no longer works. Change the test to locate the kube-apiserver container by name.
2017-03-08 11:38:07 -08:00
Kubernetes Submit Queue d306acca86 Merge pull request #42175 from enisoc/controller-ref-dep
Automatic merge from submit-queue

Deployment: Fully Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings Deployment into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

This ensures that Deployment does not fight with other controllers over control of Pods and ReplicaSets.

Ref: https://github.com/kubernetes/kubernetes/issues/24433

**Special notes for your reviewer**:

**Release note**:

```release-note
Deployment now fully respects ControllerRef to avoid fighting over Pods and ReplicaSets. At the time of upgrade, **you must not have Deployments with selectors that overlap**, or else [ownership of ReplicaSets may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading).
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-07 20:44:36 -08:00
Yu-Ju Hong 9401c39a4e e2e: fix restarting the apiserver 2017-03-07 14:54:59 -08:00
Kubernetes Submit Queue feb81270d1 Merge pull request #42346 from kargakis/e2e-deployment-fix
Automatic merge from submit-queue

e2e: require minimum completeness in deployment tests

@janetkuo should reduce deployment-related flakes

For example:
https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/ci-kubernetes-e2e-gci-gke/5334#k8sio-deployment-scaled-rollout-deployment-should-not-block-on-annotation-check
Deployment with 5 pods, all of them updated to the latest replica set. For some reason one of them is never scheduled and even though the strategy parameters in the Deployment allow 2 maxUnavailable the test is stuck for 5mins waiting for the last pod.
```
I0228 12:33:31.406] Feb 28 12:33:20.255: INFO: Pod nginx-2629236890-r7z5n is not available:
I0228 12:33:31.406] {TypeMeta:{Kind: APIVersion:} ObjectMeta:{Name:nginx-2629236890-r7z5n GenerateName:nginx-2629236890- Namespace:e2e-tests-deployment-gctjw SelfLink:/api/v1/namespaces/e2e-tests-deployment-gctjw/pods/nginx-2629236890-r7z5n UID:7095ad3e-fdf4-11e6-af4a-42010af00010 ResourceVersion:7804 Generation:0 CreationTimestamp:2017-02-28 12:28:18.408376434 -0800 PST DeletionTimestamp:<nil> DeletionGracePeriodSeconds:<nil> Labels:map[pod-template-hash:2629236890 name:nginx] Annotations:map[kubernetes.io/created-by:{"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"ReplicaSet","namespace":"e2e-tests-deployment-gctjw","name":"nginx-2629236890","uid":"7085ba3f-fdf4-11e6-af4a-42010af00010","apiVersion":"extensions","resourceVersion":"7743"}}
I0228 12:33:31.407] ] OwnerReferences:[{APIVersion:extensions/v1beta1 Kind:ReplicaSet Name:nginx-2629236890 UID:7085ba3f-fdf4-11e6-af4a-42010af00010 Controller:0xc420beccf0}] Finalizers:[] ClusterName:} Spec:{Volumes:[{Name:default-token-58h80 VolumeSource:{HostPath:nil EmptyDir:nil GCEPersistentDisk:nil AWSElasticBlockStore:nil GitRepo:nil Secret:&SecretVolumeSource{SecretName:default-token-58h80,Items:[],DefaultMode:*420,Optional:nil,} NFS:nil ISCSI:nil Glusterfs:nil PersistentVolumeClaim:nil RBD:nil FlexVolume:nil Cinder:nil CephFS:nil Flocker:nil DownwardAPI:nil FC:nil AzureFile:nil ConfigMap:nil VsphereVolume:nil Quobyte:nil AzureDisk:nil PhotonPersistentDisk:nil Projected:nil}}] InitContainers:[] Containers:[{Name:nginx Image:gcr.io/google_containers/update-demo:kitten Command:[] Args:[] WorkingDir: Ports:[] EnvFrom:[] Env:[] Resources:{Limits:map[] Requests:map[]} VolumeMounts:[{Name:default-token-58h80 ReadOnly:true MountPath:/var/run/secrets/kubernetes.io/serviceaccount SubPath:}] LivenessProbe:nil ReadinessProbe:nil Lifecycle:nil TerminationMessagePath:/dev/termination-log TerminationMessagePolicy:File ImagePullPolicy:IfNotPresent SecurityContext:nil Stdin:false StdinOnce:false TTY:false}] RestartPolicy:Always TerminationGracePeriodSeconds:0xc420becd28 ActiveDeadlineSeconds:<nil> DNSPolicy:ClusterFirst NodeSelector:map[] ServiceAccountName:default DeprecatedServiceAccount:default AutomountServiceAccountToken:<nil> NodeName:gke-bootstrap-e2e-default-pool-800b6140-fsl5 HostNetwork:false HostPID:false HostIPC:false SecurityContext:&PodSecurityContext{SELinuxOptions:nil,RunAsUser:nil,RunAsNonRoot:nil,SupplementalGroups:[],FSGroup:nil,} ImagePullSecrets:[] Hostname: Subdomain: Affinity:nil SchedulerName:default-scheduler Tolerations:[]} Status:{Phase:Pending Conditions:[{Type:Initialized Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-02-28 12:28:18 -0800 PST Reason: Message:} {Type:Ready Status:False LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-02-28 12:28:18 -0800 PST Reason:ContainersNotReady Message:containers with unready status: [nginx]} {Type:PodScheduled Status:True LastProbeTime:0001-01-01 00:00:00 +0000 UTC LastTransitionTime:2017-02-28 12:28:18 -0800 PST Reason: Message:}] Message: Reason: HostIP:10.240.0.2 PodIP: StartTime:2017-02-28 12:28:18 -0800 PST InitContainerStatuses:[] ContainerStatuses:[{Name:nginx State:{Waiting:&ContainerStateWaiting{Reason:ContainerCreating,Message:,} Running:nil Terminated:nil} LastTerminationState:{Waiting:nil Running:nil Terminated:nil} Ready:false RestartCount:0 Image:gcr.io/google_containers/update-demo:kitten ImageID: ContainerID:}] QOSClass:BestEffort}}
```

@kubernetes/sig-apps-misc
2017-03-07 09:11:25 -08:00
Kubernetes Submit Queue ed04316828 Merge pull request #41890 from soltysh/issue37166
Automatic merge from submit-queue (batch tested with PRs 41890, 42593, 42633, 42626, 42609)

Remove everything that is not new from batch/v2alpha1

Fixes #37166.

@lavalamp you've asked for it 
@erictune this is a prereq for moving CronJobs to beta. I initially planned to put all in one PR, but after I did that I figured out it'll be easier to review separately. ptal 

@kubernetes/api-approvers @kubernetes/sig-api-machinery-pr-reviews ptal
2017-03-07 08:10:38 -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
Kubernetes Submit Queue d50a59ec66 Merge pull request #42080 from enisoc/controller-ref-ss
Automatic merge from submit-queue (batch tested with PRs 42080, 41653, 42598, 42555)

StatefulSet: Respect ControllerRef

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

This is part of the completion of the [ControllerRef](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md) proposal. It brings StatefulSet into full compliance with ControllerRef. See the individual commit messages for details.

**Which issue this PR fixes**:

Fixes #36859

**Special notes for your reviewer**:

**Release note**:

```release-note
StatefulSet now respects ControllerRef to avoid fighting over Pods. At the time of upgrade, **you must not have StatefulSets with selectors that overlap** with any other controllers (such as ReplicaSets), or else [ownership of Pods may change](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md#upgrading).
```
cc @erictune @kubernetes/sig-apps-pr-reviews
2017-03-06 17:16:10 -08:00
Anthony Yeh f020c9ae6c Deployment: Update overlapping e2e test for ControllerRef. 2017-03-06 15:12:07 -08:00
Anthony Yeh 887acb07ea Deployment/util: Filter by ControllerRef.
The list functions in deployment/util are used outside the Deployment
controller itself. Therefore, they don't do actual adoption/orphaning.
However, they still need to avoid listing things that don't belong.
2017-03-06 15:12:06 -08:00
Anthony Yeh d8a0017559 StatefulSet: Use synchronous Delete of SS in e2e.
This is needed because we changed the default for SS to
OrphanDependents.
2017-03-06 09:46:04 -08:00
Seth Jennings ccd87fca3f kubelet: add cgroup manager metrics 2017-03-06 08:53:47 -06:00
Maciej Szulik 6c0cd24865 Drop NewDefultGroupVersionFramework in favor of client automatically handling proper GroupVersions 2017-03-06 12:12:38 +01:00
Nick Sardo 6bba665c81 Cleanup gce resources from ingress upgrade tests 2017-03-05 18:38:45 -08:00
shashidharatd 0fe664c264 auto generated bazel build file 2017-03-06 03:20:13 +05:30
shashidharatd 5f2df1f88f remove unused federation_util.go 2017-03-06 03:20:13 +05:30
Kubernetes Submit Queue f750721b84 Merge pull request #42367 from kow3ns/ss-flakes
Automatic merge from submit-queue (batch tested with PRs 42443, 38924, 42367, 42391, 42310)

Fix StatefulSet e2e flake

**What this PR does / why we need it**:
Fixes StatefulSet e2e flake by ensuring that the StatefulSet controller has observed the unreadiness of Pods prior to attempting to exercise scale functionality.
**Which issue this PR fixes** 
fixes #41889
```release-note
NONE
```
2017-03-03 18:08:42 -08:00
Kenneth Owens 08f95aff0f Fixes e2e flake by ensuring that the StatefulSet observes mutations to
Pods prior mutating the StatefulSet object to trigger sclaing.

Add ObervedVersion check
2017-03-03 11:24:47 -08:00
Kubernetes Submit Queue a2c7eb2754 Merge pull request #42266 from wojtek-t/fix_secret_tests_in_large_clusters
Automatic merge from submit-queue (batch tested with PRs 41306, 42187, 41666, 42275, 42266)

Bump test timeouts to make secret tests work in large clusters
2017-03-03 10:54:45 -08:00
Clayton Coleman f3d9ad678a
Handle potential conflicts on service endpoint test deletion
Cleanup should ignore conflicts and notfound errors
2017-03-03 01:29:57 -05:00
Anthony Yeh bdc4540e92 e2e/framework: Deflake cleanup of RCs in service_util.
The previous Get/Update pattern with no retry on resource version mismatch
would flake with the following error:

"the object has been modified; please apply your changes to the latest
version and try again"
2017-03-02 16:51:14 -08:00
Kubernetes Submit Queue effbad9ad0 Merge pull request #42020 from nicksardo/ingress_upgrade
Automatic merge from submit-queue (batch tested with PRs 41644, 42020, 41753, 42206, 42212)

Ingress-glbc upgrade tests

Basically #41676 but with some fixes and added comments.  @bprashanth has been away this week and it's desirable to have this in before code freeze.
2017-03-01 15:30:32 -08:00
Nick Sardo 9dc98f5296 upgrade tests: ingress/glbc 2017-03-01 11:52:55 -08:00
Michail Kargakis 3921a2a2f6 e2e: require minimum completeness in deployment tests 2017-03-01 19:25:12 +01:00
Wojciech Tyczynski 9db6aa50f0 Make secret tests work in large clusters 2017-03-01 17:58:30 +01:00
Kubernetes Submit Queue ed479163fa Merge pull request #42116 from vishh/gpu-experimental-support
Automatic merge from submit-queue

Extend experimental support to multiple Nvidia GPUs

Extended from #28216

```release-note
`--experimental-nvidia-gpus` flag is **replaced** by `Accelerators` alpha feature gate along with  support for multiple Nvidia GPUs. 
To use GPUs, pass `Accelerators=true` as part of `--feature-gates` flag.
Works only with Docker runtime.
```

1. Automated testing for this PR is not possible since creation of clusters with GPUs isn't supported yet in GCP.
1. To test this PR locally, use the node e2e.
```shell
TEST_ARGS='--feature-gates=DynamicKubeletConfig=true' FOCUS=GPU SKIP="" make test-e2e-node
```

TODO:

- [x] Run manual tests
- [x] Add node e2e
- [x] Add unit tests for GPU manager (< 100% coverage)
- [ ] Add unit tests in kubelet package
2017-03-01 04:52:50 -08:00
Chao Xu 31cb266340 tests 2017-02-28 23:05:41 -08:00
Jon Cope 6e317762fd Reword poll message to log a more readable message. 2017-02-28 15:54:43 -06:00
Vishnu kannan 318f4e102a adding an e2e for GPUs
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-02-28 13:42:08 -08:00
Kubernetes Submit Queue 5891fa021b Merge pull request #42193 from mml/etcd-upgrade-test
Automatic merge from submit-queue

Change etcd test image to 3.0.17.

Follow-up from #41540
2017-02-27 23:10:45 -08:00
Matt Liggett f37f7d42ba Change etcd test image to 3.0.17. 2017-02-27 14:23:14 -08:00