Automatic merge from submit-queue
service e2e: remove TODO and subtle changes in logging
Removes the stale `TODO` for external source IP preservation as the e2e test of ESIPP was added.
Changes logging in create service functions: namespace/namespace -> namespace/serviceName.
@bprashanth
Automatic merge from submit-queue
Update elasticsearch and kibana usage
```release-note
Updated default Elasticsearch and Kibana used for elasticsearch logging destination to versions 2.4.1 and 4.6.1 respectively.
```
Updated controllers for elasticsearch and kibana to use newer versions of images. Fixed e2e test because of elasticsearch backward incompatible API changes.
Fixed out of sync elasticsearch controller for coreos.
@piosz
Automatic merge from submit-queue
Loadbalanced client src ip preservation enters beta
Sounds like we're going to try out the proposal (https://github.com/kubernetes/kubernetes/issues/30819#issuecomment-249877334) for annotations -> fields on just one feature in 1.5 (scheduler). Or do we want to just convert to fields right now?
Automatic merge from submit-queue
Verify petset status.replicas in e2e test
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->
**What this PR does / why we need it**: follow up #33983. PetSet status.replicas bug is fixed, so adding tests for it (especially for the `should handle healthy pet restarts during scale` case)
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
**Special notes for your reviewer**: cc @erictune @foxish @kubernetes/sig-apps
**Release note**:
<!-- Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access)
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.
-->
```release-note
NONE
```
Automatic merge from submit-queue
Set non-always RestartPolicy for write-pod in pv e2e
Due to https://github.com/kubernetes/kubernetes/pull/34632 the RestartPolicy can't be Always (& it shouldn't be anyway)
Automatic merge from submit-queue
Add secret e2e test for keys mapping
**What this PR does / why we need it**: Adds a basic e2e test missing in secrets
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*:
**Special notes for your reviewer**:
**Release note**:
```NONE
```
This patch adds a secret e2e test. While configmap e2e tests are far
more complete, this patch makes secret e2e tests one step closer.
Also, now is more easy to add more tests without code duplication (as I
did in earlier patches :-/), because of the functions created, and is
more easy to make it similar to confimap e2e in the future, that is
really complete.
Automatic merge from submit-queue
Adding default StorageClass annotation printout for resource_printer and describer and some refactoring
adding ISDEFAULT for _kubectl get storageclass_ output
```
[root@screeley-sc1 gce]# kubectl get storageclass
NAME TYPE ISDEFAULT
another-class kubernetes.io/gce-pd NO
generic1-slow kubernetes.io/gce-pd YES
generic2-fast kubernetes.io/gce-pd YES
```
```release-note
Add ISDEFAULT to kubectl get storageClass output
```
@kubernetes/sig-storage
Commit 53ec6e6 missed to remove this deferred call (probably due to a
rebase).
I noticied it while working with the code. I'm not sure why the original
commits removes them, but it seems the right thing to do.
This patch adds a secret e2e test. While configmap e2e tests are far
more complete, this patch makes secret e2e tests one step closer.
Also, now is more easy to add more tests without code duplication (as I
did in earlier patches :-/), because of the functions created, and is
more easy to make it similar to confimap e2e in the future, that is
really complete.
Automatic merge from submit-queue
e2e: stop tracking resource usage for the "misc" container
There is e2e test checking the resource usage of "misc", and it is not
supported on GCI.
Automatic merge from submit-queue
New client-go structure
This PR is part of restructuring client-go (https://github.com/kubernetes/client-go/issues/9#issue-181545998). In short, the top-level folder for client-go versions are removed.
This PR also runs copy.sh to pick up changes in the main repository. The number of files in client-go has increase from 1361 files to 1405.
@mbohlool @mml @timoreimann
Automatic merge from submit-queue
Add test_list command, to enumerate unit and e2e tests.
This uses go/parser and go/ast to analyze all test files in ~1 second.
It only recognizes a few simple structures that the tests all have, and
modifies a few tests to fit expected structure better.
This is part of an effort to ensure all tests have owners, by having a
verify check to catch new tests being added without an owner.
This uses go/parser and go/ast to analyze all test files in ~1 second.
It only recognizes a few simple structures that the tests all have, and
modifies a few tests to fit expected structure better.
This is part of an effort to ensure all tests have owners, by having a
verify check to catch new tests being added without an owner.
Automatic merge from submit-queue
Make E2E tests easier to debug
This PR removes deferred deletion calls in E2E tests in order to make test easier to debug. Some of these tests predate namespace finalization; we should just rely on that mechanism to ensure that framework test artifacts are deleted.
Automatic merge from submit-queue
controller: set minReadySeconds in deployment's replica sets
* Estimate available pods for a deployment by using minReadySeconds on
the replica set.
* Stop requeueing deployments on pod events, superseded by following the
replica set status.
* Cleanup redundant deployment utilities
Fixes https://github.com/kubernetes/kubernetes/issues/26079
@kubernetes/deployment ptal
Automatic merge from submit-queue
Cleanup the commented code for overriding flags with viper. For now,…
Minor cleanup for the viper configuration logic, removes commented code into a function of its own. We can decide wether or not to overwrite flag values at a later time...
Automatic merge from submit-queue
Move RunRC-like functions to test/utils
Ref. #34336
cc @timothysc - the "move" part of the small refactoring. @jayunit100
Automatic merge from submit-queue
e2e: don't require minimum availability once scaling takes place
This test shouldn't care about availability at all in the first place.
@mfojtik @kubernetes/deployment ptal
Fixes https://github.com/kubernetes/kubernetes/issues/34717
Automatic merge from submit-queue
Add e2e tests for storageclass
- test pd-ssd and pd-standard on GCE,
- test all four volume types and encryption on AWS
- test just the default volume type on OpenStack (right now, there is no API
to get list of them)
These tests are quite slow, e.g. there are two tests on AWS that has to run mkfs.ext4 on 500 GB magnetic drive with low IOPS, which takes ~3-4 minutes each.
Automatic merge from submit-queue
Fix race condition in test with git server startup
Fixes https://github.com/kubernetes/kubernetes/issues/32467 (hopefully)
Previously, the test didn't ensure the git server was running before attempting to connect to it.
- test pd-ssd and pd-standard on GCE,
- test all four volume types on AWS
- test just the default volume type on OpenStack (right now, there is no API
to get list of them)
* Estimate available pods for a deployment by using minReadySeconds on
the replica set.
* Stop requeueing deployments on pod events, superseded by following the
replica set status.
* Cleanup redundant deployment utilities
Automatic merge from submit-queue
Fix leaking ingress resources in federated ingress e2e test.
Originally the federated ingresses were being deleted, but due to the lack of cascading deletion, the cluster ingresses were never being deleted, leading to leaked GCE loadbalancer resources. This fixes that.
Automatic merge from submit-queue
Ignore mirror pods with RestartPolicy == Never in restart tests
Kubelet does not sync the mirror pods once they have terminated. If, for some
reason, that such mirror pods get deleted once they have terminated (either by
the node controller or by users), kubelet will not attempt to recreate them.
However, when kubelet restarts, it will examine the static pods, sync once,
and create a mirror pod. This has led to unexpected pod counts in disruptive
tests where kubelet gets restarted on purpose (see #34003).
This change disregard such mirror pods when totaling the pods to fix the test
flake until we have time to implement a long-term solution.
This PR addresses #34003
Automatic merge from submit-queue
Add gcl cluster logging test
This PR changes default logging destination for tests to gcp and adds test for cluster logging using google cloud logging
Fix#20760
Automatic merge from submit-queue
test: move deployment deletion in its own test
@kubernetes/deployment this PR moves the deletion of deployment in its own test (no need to delete deployments in every test since the namespace controller does that for us once the namespace gets deleted after the test finishes)
Fixes https://github.com/kubernetes/kubernetes/issues/33256
Automatic merge from submit-queue
Make logging function injectable in RCConfig
Ref. #34336
cc @timothysc - the "move" part of the small refactoring. @jayunit100
Automatic merge from submit-queue
remove [Conformance] flag on some e2es
Downstream distributions that absorb the upstream tests would like to give their customers a standard mechanism to validate their clusters, post setup. As of today [Conformance] works for most things, but there are a known set of tests that vary due to opinionated differences around networking, security, etc... and providing a complete skip list can be cumbersome. To address this, we've simply modified the flag on some tests to [Conformance:Variant]. All existing behavior should be maintained.
Fixes: #34105
Kubelet does not sync the mirror pods once they have terminated. If, for some
reason, that such mirror pods get deleted once they have terminated (either by
the node controller or by users), kubelet will not attempt to recreate them.
However, when kubelet restarts, it will examine the static pods, sync once,
and create a mirror pod. This has led to unexpected pod counts in disruptive
tests where kubelet gets restarted on purpose (see #34003).
This change disregard such mirror pods when totaling the pods to fix the test
flake until we have time to implement a long-term solution.
Automatic merge from submit-queue
Fix confusing log messages
While debugging https://github.com/kubernetes/kubernetes/issues/33876 , I noticed following confusing message:
```
The status of Pod kibana-logging-v1-j99la is Running, waiting for it to be either Running or Failed
```
Automatic merge from submit-queue
annotate some addtional errors in e2e tests
<!-- Thanks for sending a pull request! Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->
**What this PR does / why we need it**:
Adds some additional context to e2e test failures.
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, #<issue_number>, ...)` format, will close that issue when PR gets merged)*: some work toward #34059
**Special notes for your reviewer**: I didn't want to go through all of the offending cases so I picked off a few files and addressed those.
**Release note**:
<!-- Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access)
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`.
-->
```release-note
NONE
```
Automatic merge from submit-queue
remove testapi.Default.GroupVersion
I'm going to try to take this as a series of mechanicals. This removes `testapi.Default.GroupVersion()` and replaces it with `registered.GroupOrDie(api.GroupName).GroupVersion`.
@caesarxuchao I'm trying to see how much of `pkg/api/testapi` I can remove.
Automatic merge from submit-queue
try to use ifdown/ifup if available
Tried this on both ContainerVM and GCI image.
`ip link set eth0 down` is too destructive for containerVM. It could not recover with correct network setup hence failing the test. Need to use ifdown/ifup on containerVM.
reference:
http://serverfault.com/questions/603906/ip-link-set-not-assigning-ip-address-but-ifup-does
Automatic merge from submit-queue
Don't set timeouts in clients in tests
We are not setting timeouts in production - we shouldn't do it in tests then...
Addresses point 2. of #31345
Automatic merge from submit-queue
add delete-namespace-on-failure flag
I have been doing this for a while.
Setting `--delete-namespace=false --clean-start=true` only works if you have only one e2e test running in a loop.
This PR lets someone to set `delete-namespace-on-failure=false` and run multiple tests in parallel and preserve the crime scene. It makes it easier to reproduce failures.
Let me know if this is worth it or there are some other tricks I am not aware.
Automatic merge from submit-queue
Delete federation namespace after the test completes
The code was commented because of a bug in namespace deletion which is now fixed.
Note that this deletes the namespace in federation control plane. We still need to delete the namespace from each cluster (cascading deletion)
cc @kubernetes/sig-cluster-federation
Automatic merge from submit-queue
Revert "Revert "move pod networking tests common""
Reverts #34011
And fix the problem causing `Granular Checks: Services [Slow] should update nodePort` tests to fail
Automatic merge from submit-queue
Add a retry loop to KubeletManagerEtcHosts flake
Add a retry loop to KubeletManagerEtcHosts flake
Note: this still makes the test fail if a retry occurs, but
will give us more information regarding whether or not the
test flake could be occuring due to delay in mounting of
/etc/hosts.
Note: this still makes the test fail if a retry occurs, but
will give us more information regarding whether or not the
test flake could be occuring due to delay in mounting of
/etc/hosts.
Automatic merge from submit-queue
Check for empty string post trimming
We curl in a retry loop and timeout, trimming stdout to find endpoint names. When curl hits the timeout, stdout is empty, so we insert the empty string into the received set of endpoints.
Fixes https://github.com/kubernetes/kubernetes/issues/32684
Automatic merge from submit-queue
Improve source ip preservation test, fail the test instead of panic.
From #31085.
The source IP preserve test starts to be flake again. Sending out this PR to get rid of panicing and log the unexpected output for future investigation.
@freehan
Automatic merge from submit-queue
[Client-gen] Let versioned client use versioned options
i.e., use v1.ListOptions, v1.DeleteOptions when possible.
Remove the extension/v1beta1.ListOptions, because it's exactly the same as v1.ListOptions, and is not referred throughout the code base. After its removal, I register v1.ListOptions during extensions/v1beta1 scheme registration.
First three commits are manual changes.
Fix#27753
cc @lavalamp
Automatic merge from submit-queue
Add a check for file size if the reading content returns empty
In order to debug the flaky tests for writing/reading files via
contains, this PR adds a check for file size if reading returns empty
content.
Automatic merge from submit-queue
Fix kubelet perf data to make it work again for perfdash.
Addresses https://github.com/kubernetes/kubernetes/pull/30333#issuecomment-248791257.
Add the "node" label back to fix kubelet perf dash. At least for now, we still need original perfdash to catch summary api performance regression.
/cc @coufon @yujuhong
Automatic merge from submit-queue
Heal the namespaceless ingresses in federation e2e.
For createIngressOrFail, it incorrectly returned the ingress passed in as an argument, which does not include the namespace, instead of the ingress returned from the create call (which does).
This in turn leads to errors in e2e tests like this:
INFO: Waiting for Ingress federated-ingress to acquire IP, error an empty namespace may not be set when a resource name is provided.
Self-applying LGTM label, as this is the same code that was LGTM'd by @nikhiljindal in #33502
Automatic merge from submit-queue
Delete evicted pet
If pet was evicted by kubelet - it will stuck in this state forever.
By analogy to regular pod we need to re-create pet so that it will
be re-scheduled to another node, so in order to re-create pet
and preserve consitent naming we will delete it in petset controller
and create after that.
fixes: https://github.com/kubernetes/kubernetes/issues/31098
Automatic merge from submit-queue
Deregister clusters during federated namespace e2e tear down.
This is causing other tests to leak resources.
cc @mwielgus @kubernetes/sig-cluster-federation
Automatic merge from submit-queue
fix kubectl taint e2e flake: add retries for removing taint
**What this PR does / why we need it**:
Why we need it: recent failures occurred in #29503 are caused by taints removing conflict on nodes, this PR is to fix it. (#33073 fixed taints updating conflict, but not taints removing.)
What this PR does: use `runKubectlRetryOrDie()` instead of `RunKubectlOrDie()` in all the places in "Kubectl taint" e2e tests.
**Which issue this PR fixes** : fixes part of #29503, (would like to keep this issue open for some days more to make sure no other failures occur)
**Special notes for your reviewer**: NONE
**Release note**: NONE
Automatic merge from submit-queue
Increase timeout for federated ingress test.
Right now federated ingress e2e takes more than 1 minute, as we need to wait for the first clusters ingress to have an IP address allocated to it before creating the others. Sometimes this takes a while due to GCE loadbalancer backend delays.
Automatic merge from submit-queue
Change minion to node
Continuation of #1111
I tried to keep this PR down to just a simple search-n-replace to keep
things simple. I may have gone too far in some spots but its easy to
roll those back if needed - just let me know.
I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.
Signed-off-by: Doug Davis <dug@us.ibm.com>
Automatic merge from submit-queue
Make the restart test restart the nodes without a mig rolling update.
This is one approach to fix#33113. I switched from using a mig rolling-update to just pushing the reset button on the nodes and then waiting for their boot IDs to change.
Contination of #1111
I tried to keep this PR down to just a simple search-n-replace to keep
things simple. I may have gone too far in some spots but its easy to
roll those back if needed.
I avoided renaming `contrib/mesos/pkg/minion` because there's already
a `contrib/mesos/pkg/node` dir and fixing that will require a bit of work
due to a circular import chain that pops up. So I'm saving that for a
follow-on PR.
I rolled back some of this from a previous commit because it just got
to big/messy. Will follow up with additional PRs
Signed-off-by: Doug Davis <dug@us.ibm.com>
We had another bug where we confused the hostname with the NodeName.
To avoid this happening again, and to make the code more
self-documenting, we use types.NodeName (a typedef alias for string)
whenever we are referring to the Node.Name.
A tedious but mechanical commit therefore, to change all uses of the
node name to use types.NodeName
Also clean up some of the (many) places where the NodeName is referred
to as a hostname (not true on AWS), or an instanceID (not true on GCE),
etc.
Automatic merge from submit-queue
Added e2e framweork and a simple test for HA master.
Added e2e framweork for testing HA master. Added one simple e2e test for HA master that first grows and then shrinks GCE cluster.
Automatic merge from submit-queue
Corrected timeout on Downward API volume
The tests for Downward API volume were apparently created before the
default sync-frequency was set to 1 minute. As the current
implementation of Pod gives us no guarantee that the changes will be
seen in Downward API before `sync-frequency` we need the tests to
reflect this.
Fixes: #29633
Automatic merge from submit-queue
Pass the real cluster scoped service object to cleanup functions instead of passing the federation scoped object.
cc @kubernetes/sig-cluster-federation
Ref: Issue #31624
Automatic merge from submit-queue
Logging soak
Implements #24427
Needs
- #24471 so that it doesnt clog test outputs for scale
- builds on the utils function added in support of #22869
cc @timothysc @kubernetes/sig-testing
Automatic merge from submit-queue
Allow garbage collection to work against different API prefixes
The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.
Allows OpenShift to use the GC
Automatic merge from submit-queue
Speed up job's e2e when waiting for failure
**What this PR does / why we need it**:
Job controller synchronizes objects only when job itself or underlying pod changes. Or, when full resync is performed once 10 mins. This leads e2e test to unnecessarily wait that longer timeout, sometimes at least. I've added job modification action which triggers resync, if the job wasn't terminated within shorter period of time.
@ixdy ptal
@janetkuo @erictune fyi
Automatic merge from submit-queue
Staging 1.5 client
Created the 1.5 folder and remove the 1.4 folder in the staging area in the master branch.
Content of kubernetes/client-go/1.4 will be pulled from the kubernetes/kubernetes 1.4 branch (https://github.com/kubernetes/contrib/pull/1719)
The GC needs to build clients based only on Resource or Kind. Hoist the
restmapper out of the controller and the clientpool, support a new
ClientForGroupVersionKind and ClientForGroupVersionResource, and use the
appropriate one in both places.
Automatic merge from submit-queue
Node E2E: Change the disk eviction test to pull images again after the test.
Fixes https://github.com/kubernetes/kubernetes/issues/32022#issuecomment-248677706.
This PR changes the disk eviction test to pull test images again in `AfterEach`, because images may be evicted during the test.
@yujuhong
/cc @kubernetes/sig-node
The tests for Downward API volume were apparently created before the
default sync-frequency was set to 1 minute. As the current
implementation of Pod gives us no guarantee that the changes will be
seen in Downward API before `sync-frequency` we need the tests to
reflect this.
Fixes: #29633
Automatic merge from submit-queue
Minor Ingress tests cleanup, that includes service shard and GCE resource cleanups in underlying clusters.
Follow up for #32810.
cc @kubernetes/sig-cluster-federation
Automatic merge from submit-queue
Dumping federation events if federation e2e test failed
Updating the e2e framework to dump events in federation control plane if a federation e2e test failed.
This should help in debugging https://github.com/kubernetes/kubernetes/issues/32733
cc @kubernetes/sig-cluster-federation
Spawn pet set with single replica and simple pod. They will have
conflicting hostPort definitions, and spawned on the same node.
As the result pet set pod, it will be created after simple pod, will be
in Failed state. Pet set controller will try to re-create it. After
verifying that pet set pod failed and was recreated atleast once, we will
remove pod with conflicting hostPort and wait until pet set pod will be in
running state.
Change-Id: I5903f5881f8606c696bd390df58b06ece33be88a