Commit Graph

45568 Commits

Author SHA1 Message Date
Christian Bell
273eb6b9b5 Unify test timeouts under a common name. 2017-03-20 14:53:40 -07:00
Janet Kuo
f780f32c1e Use Semantic.DeepEqual to compare DaemonSet template on updates 2017-03-20 13:58:49 -07:00
Kubernetes Submit Queue
948e3754f8 Merge pull request #43368 from feiskyer/dns-policy
Automatic merge from submit-queue (batch tested with PRs 43398, 43368)

CRI: add support for dns cluster first policy

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

PR #29378 introduces ClusterFirstWithHostNet policy but only dockertools was updated to support the feature. 

This PR updates kuberuntime to support it for all runtimes.


**Which issue this PR fixes** 

fixes #43352

**Special notes for your reviewer**:

Candidate for v1.6.

**Release note**:

```release-note
NONE
```

cc @thockin @luxas @vefimova @Random-Liu
2017-03-20 13:54:33 -07:00
Kubernetes Submit Queue
bc82d87f0a Merge pull request #43398 from enisoc/deletion-race-flake
Automatic merge from submit-queue

Deflake TestSyncDeploymentDeletionRace

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

The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```

I checked the other controllers, and they all were already not starting informers for the deletion race test. I also checked that the deletion race tests for other controllers all pass with `-count 100000`.

**Which issue this PR fixes**:

Fixes #43390

**Special notes for your reviewer**:

**Release note**:
```release-note
NONE
```
2017-03-20 13:26:03 -07:00
Kubernetes Submit Queue
e668ee1182 Merge pull request #43370 from feiskyer/port-mapping
Automatic merge from submit-queue (batch tested with PRs 42659, 43370)

dockershim: process protocol correctly for port mapping

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

dockershim: process protocol correctly for port mapping.

**Which issue this PR fixes** 

Fixes #43365.

**Special notes for your reviewer**:

Should be included in v1.6.

**Release note**:

```release-note
NONE
```

cc/ @Random-Liu @justinsb @kubernetes/sig-node-pr-reviews
2017-03-20 12:40:40 -07:00
Kubernetes Submit Queue
e1b4d03499 Merge pull request #42659 from enisoc/controller-ref-rc-rs
Automatic merge from submit-queue (batch tested with PRs 42659, 43370)

RC/RS: Fixes for ControllerRef.

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

This fixes some issues with RC/RS ControllerRef handling that were brought up in reviews for other controller types, after #41984 was merged. See the individual commit messages for details.

**Which issue this PR fixes**:

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-20 12:40:39 -07:00
Derek Carr
5c8b957779 Fix faulty assumptions in summary API testing 2017-03-20 14:56:11 -04:00
Anthony Yeh
0b9233648e Deflake TestSyncDeploymentDeletionRace
The cache was sometimes catching up while we were testing the case
where the cache is not yet caught up.

Before this fix, I could reproduce the failure with the following
command. After the fix, it passes.

```
go test -count 100000 -run TestSyncDeploymentDeletionRace
```
2017-03-20 11:13:26 -07:00
Anthony Yeh
c74aab649f RC/RS: Mark lookup-cache-size flags as deprecated. 2017-03-20 09:10:12 -07:00
Anthony Yeh
f4ee44eb39 RC/RS: Check that ControllerRef UID matches found controller.
Otherwise, we may confuse a former controller by that name with a new
one that has the same name.
2017-03-20 08:57:42 -07:00
Maciej Pytel
7f9b3b6358 e2e test for cluster-autoscaler draining node 2017-03-20 16:46:43 +01:00
Kubernetes Submit Queue
38055983e0 Merge pull request #43294 from crassirostris/cluster-logging-test-simplifying
Automatic merge from submit-queue

Loosen requirements of cluster logging e2e tests, make them more stable

There should be an e2e test for cloud logging in the main test suite, because this is the important part of functionality and it can be broken by different components.

However, existing cluster logging e2e tests were too strict for the current solution, which may loose some log entries, which results in flakes. There's no way to fix this problem in 1.6, so this PR makes basic cluster logging e2e tests less strict.
2017-03-20 06:04:59 -07:00
Pengfei Ni
95c3782043 Rewrite resolv.conf for dockershim
PR #29378 introduces ClusterFirstWithHostNet, but docker doesn't support
setting dns options togather with hostnetwork. This commit rewrites
resolv.conf same as dockertools.
2017-03-20 18:45:39 +08:00
Pengfei Ni
079158fa08 CRI: add support for dns cluster first policy
PR #29378 introduces ClusterFirstWithHostNet policy but only dockertools
was updated to support the feature. This PR updates kuberuntime to
support it for all runtimes.

Also fixes #43352.
2017-03-20 17:50:38 +08:00
Pengfei Ni
99ed3202f3 Run hack/update-bazel.sh 2017-03-20 17:48:36 +08:00
Pengfei Ni
53b5f2df48 Add unit test for MakePortsAndBindings 2017-03-20 17:47:38 +08:00
Pengfei Ni
2ddaaec199 dockershim: process protocol correctly for port mapping 2017-03-20 16:52:24 +08:00
Kubernetes Submit Queue
47320fd3f0 Merge pull request #42938 from enisoc/orphan-race
Automatic merge from submit-queue

GC: Fix re-adoption race when orphaning dependents.

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

The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).

**Which issue this PR fixes**:

Fixes #42639

**Special notes for your reviewer**:

**Release note**:
```release-note
```

cc @kubernetes/sig-apps-pr-reviews
2017-03-20 01:30:11 -07:00
Kubernetes Submit Queue
f880340314 Merge pull request #43231 from csbell/service-race
Automatic merge from submit-queue

[Federation] Fix deletion logic in service controller

This is a regression from 1.5 exposed by cascading deletions. In order to apply updates, the service controller locks access to a cached service and spawns go routines without waiting for them. When updates and deletions arrive in quick succession, previous goroutines remain active and race with the deletion logic. Coupled with this, the service_helper was not re-evaluating the value of the DeletionTimestamp.

Without this patch, federation will sometimes leak resources at destruction time about half the time.

In e2e land, about 4-5 test runs cause service tests to eat up all global fwd-ing rules and in turn, every subsequent ingress test will fail until we manually clean up leaked resources. No possibility to go green in fed e2e until this is merged.
2017-03-20 00:19:23 -07:00
Christian Bell
3769435a45 Fix deletion logic in service controller.
This is a regression from 1.5 exposed by cascading deltions. In order to apply updates, the service controller locks access to a cached service and spawns go routines without waiting for them. When updates and deletions arrive in quick succession, previous goroutines remain active and race with the deletion logic. Coupled with this, the service_helper was not re-evaluating the value of the DeletionTimestamp.

Without this patch, federation will sometimes leak resources at destruction time.
2017-03-19 22:49:21 -07:00
Kubernetes Submit Queue
ae6a5d2bf3 Merge pull request #42827 from madhusudancs/fed-rs-e2e-update-withname
Automatic merge from submit-queue (batch tested with PRs 43355, 42827)

[Federation] Rewrite ReplicaSet CRUD and Preferences tests.

I think `should create replicasets and rebalance them` test is still flaky. I still don't know the source of this flakiness. I will continue hunting. But it is a lot less flaky than before (or perhaps it even never passed before?). This PR could be merged now and flake hunting can happen in parallel.

```release-note
NONE
```
2017-03-19 10:49:46 -07:00
Kubernetes Submit Queue
049b35c92a Merge pull request #43355 from luxas/kubeadm_dns_hostnet
Automatic merge from submit-queue (batch tested with PRs 43355, 42827)

kubeadm: In-cluster DNS should be used when self-hosting

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

I noticed that the master components doesn't use the built-in cluster DNS which they really should do in order to be able to discover other services inside the cluster (like extension API Servers like service catalog).

This is a really small change that fixes a misconfiguration that had slipped though earlier.

**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
NONE
```
@jbeda @bowei @MrHohn
2017-03-19 10:49:44 -07:00
Lucas Käldström
b7d84d53b0
kubeadm: When self-hosting, cluster DNS should be used 2017-03-19 14:18:04 +02:00
Kubernetes Submit Queue
8532c63c50 Merge pull request #43161 from luxas/kubeadm_16_offline_version
Automatic merge from submit-queue

kubeadm: Default to v1.6.0 stable in offline scenarios in beforehand

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

In offline scenarios, kubeadm will fallback to the latest well-known version.
This PR bumps that to v1.6. We can merge now, and in the small gap between the merge of this PR and the actual v1.6 release, kubeadm devs will have to explicitely set k8s version.

**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
NONE
```
@jbeda
2017-03-19 05:16:20 -07:00
Madhusudan.C.S
cf0c84bc45 [Federation] Major rewrite of replicaset e2e tests. 2017-03-18 20:05:51 -07:00
Kubernetes Submit Queue
082c9a8fa5 Merge pull request #43087 from csbell/master
Automatic merge from submit-queue

[Federation][e2e] Provide less strict timeouts on destruction paths

The CI tests show that some timeouts are too strict. This PR harmonizes some of the "ForeverWaitTimeouts" in one place. The goal is to reduce the e2e flakiness.
2017-03-18 09:22:00 -07:00
Kubernetes Submit Queue
f348bd3b25 Merge pull request #43342 from fejta/release
Automatic merge from submit-queue

Export KUBE_VERSION for consumption by get-kube-binaries.sh

/assign @ixdy 

https://github.com/kubernetes/kubernetes/pull/43331 will not have any effect until we update get-kube.sh to export KUBE_VERSION
2017-03-18 08:38:05 -07:00
Kubernetes Submit Queue
8752bfb526 Merge pull request #43229 from mwielgus/cm-fix
Automatic merge from submit-queue

Fix federated config map unit tests

Fixes #41419 and #42847 and possibly other issues in this area.

cc: @nikhiljindal @csbell @perotinus
2017-03-18 05:08:18 -07:00
Christian Bell
fb645a11a3 Increase timeout on e2e deployment 2017-03-17 22:05:09 -07:00
Erick Fejta
cb9452f84c Export KUBE_VERSION for consumption by get-kube-binaries.sh 2017-03-17 21:16:31 -07:00
Kubernetes Submit Queue
b4455b5960 Merge pull request #43336 from saad-ali/markbadtestsasflake
Automatic merge from submit-queue (batch tested with PRs 43331, 43336)

Mark failing PersistentVolumes:GCEPD tests flaky

Move failing `PersistentVolumes:GCEPD` tests to flaky,

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

PR https://github.com/kubernetes/kubernetes/pull/40609 incorrectly removed the flaky tag.

PR https://github.com/kubernetes/kubernetes/pull/40924 re-added the flaky tag, but did not get all the tests.

This PR marks these as flaky as well:
```
[k8s.io] PersistentVolumes [Volume][Serial] [k8s.io] PersistentVolumes:GCEPD should test that deleting a PVC before the pod does not cause pod deletion to fail on PD detach
[k8s.io] PersistentVolumes [Volume][Serial] [k8s.io] PersistentVolumes:GCEPD should test that deleting the Namespace of a PVC and Pod causes the successful detach of Persistent Disk
[k8s.io] PersistentVolumes [Volume][Serial] [k8s.io] PersistentVolumes:GCEPD should test that deleting the PV before the pod does not cause pod deletion to fail on PD detach
```

CC @copejon @jeffvance @kubernetes/sig-storage-pr-reviews
2017-03-17 19:07:29 -07:00
Kubernetes Submit Queue
a32757a162 Merge pull request #43331 from fejta/release
Automatic merge from submit-queue (batch tested with PRs 43331, 43336)

Do not override KUBERNETES_RELEASE if already set

/assign @ixdy 

If the user calls `get-kube.sh` with `KUBERNETES_RELEASE` and `KUBERNETES_RELEASE_URL` already set, continue to use these values.
2017-03-17 19:07:28 -07:00
Kubernetes Submit Queue
7bc86d84c1 Merge pull request #43116 from dchen1107/master
Automatic merge from submit-queue (batch tested with PRs 42828, 43116)

Apply taint tolerations for NoExecute for all static pods.

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


**Release note**:
```
Apply taint tolerations for NoExecute for all static pods.
```

cc/ @davidopp
2017-03-17 18:14:29 -07:00
Kubernetes Submit Queue
9497139cb6 Merge pull request #42828 from janetkuo/ds-types
Automatic merge from submit-queue

Update field descriptions of DaemonSet rolling udpate

@kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-03-17 17:54:14 -07:00
saadali
82d5244cd4 Mark failing PersistentVolumes:GCEPD tests flaky 2017-03-17 17:16:07 -07:00
Kubernetes Submit Queue
3092b8f9a4 Merge pull request #43311 from timstclair/docs
Automatic merge from submit-queue

Replace out of date security disclosure doc

This document was inconsistent with the process described at https://kubernetes.io/security/, so I replaced its content with a link to the new process.

/cc @liggitt @jessfraz
2017-03-17 17:11:17 -07:00
Kubernetes Submit Queue
bb0c81a6d8 Merge pull request #43265 from liggitt/node-proxy-role
Automatic merge from submit-queue

Give apiserver full access to kubelet API

the kubelet stats API calls use both GET and POST. POST calls proxied through the API server were getting forbidden because only `get` was allowed.

more broadly, the apiserver is responsible for proxying authorized API calls to the kubelet API... I think this means the apiserver should have access to all verbs on the kubelet subresources.

Fixes #42045
2017-03-17 17:11:05 -07:00
Tim Hockin
05d936f0bd Merge pull request #43305 from VojtechVitek/update_readme_links
Update obsolete links in README and PR template
2017-03-17 17:02:03 -07:00
Kubernetes Submit Queue
7b2a86ceb3 Merge pull request #43296 from jsafrane/v1-2-tests
Automatic merge from submit-queue

Use storage.k8s.io/v1 in tests instead of v1beta1

This is trimmed version of #42477 and contains only tests of the new storage API. Together with #43285 it passes all dynamic provisioning tests on my GCE.

I did not change vsphere_utils.go and vsphere_volume_diskformat.go as @divyenpatel runs master vsphere tests with Kubernetes 1.5 - @divyenpatel, did I get it right?

@kubernetes/sig-storage-pr-reviews, @msau42, @ethernetdan
```release-note
NONE
```
2017-03-17 16:28:05 -07:00
Anthony Yeh
b4b8fdbca3 GC: Fix re-adoption race when orphaning dependents.
The GC expects that once it sees a controller with a non-nil
DeletionTimestamp, that controller will not attempt any adoption.
There was a known race condition that could cause a controller to
re-adopt something orphaned by the GC, because the controller is using a
cached value of its own spec from before DeletionTimestamp was set.

This fixes that race by doing an uncached quorum read of the controller
spec just before the first adoption attempt. It's important that this
read occurs after listing potential orphans. Note that this uncached
read is skipped if no adoptions are attempted (i.e. at steady state).
2017-03-17 15:39:26 -07:00
Erick Fejta
106a8ce469 Do not override KUBERNETES_RELEASE if already set 2017-03-17 15:29:21 -07:00
Kubernetes Submit Queue
4b00d5e42a Merge pull request #43307 from gnufied/fix-aws-legacy-tagging
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Fix AWS untagged instances

To revert to 1.5 behaviour we need to consider untagged
instances if no clusterID has been specified or found.

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

cc @justinsb
2017-03-17 15:12:35 -07:00
Kubernetes Submit Queue
eb43cd5eb3 Merge pull request #43271 from liggitt/affinity-namespace
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Remove 'all namespaces' meaning of empty list in PodAffinityTerm

Removes the distinction between `null` and `[]` for the PodAffinityTerm#namespaces field (option 4 discussed in https://github.com/kubernetes/kubernetes/issues/43203#issuecomment-287237992), since we can't distinguish between them in protobuf (and it's a less than ideal API)

Leaves the door open to reintroducing "all namespaces" function via a dedicated field or a dedicated token in the list of namespaces

Wanted to get a PR open and tests green in case we went with this option.

Not sure what doc/release-note is needed if the "all namespaces" function is not present in 1.6
2017-03-17 15:12:33 -07:00
Kubernetes Submit Queue
9630c47e03 Merge pull request #43257 from fen4o/fix-kubefed-init-example
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

Fix typo in kubefed init's example

fixes #43256
2017-03-17 15:12:31 -07:00
Kubernetes Submit Queue
edbed83790 Merge pull request #43313 from janetkuo/ds-e2e-no-update
Automatic merge from submit-queue (batch tested with PRs 43313, 43257, 43271, 43307)

In DaemonSet e2e tests, use Patch instead of Update to avoid conflict

Fixes #43310

@marun @kargakis @lukaszo @kubernetes/sig-apps-bugs
2017-03-17 15:12:29 -07:00
Jordan Liggitt
87a8c21995
Give apiserver full access to kubelet API 2017-03-17 18:05:19 -04:00
Janet Kuo
263d605112 Auto-generate 2017-03-17 14:42:37 -07:00
Kubernetes Submit Queue
f37cffcf4e Merge pull request #43239 from enisoc/kubectl-controller-ref
Automatic merge from submit-queue

kubectl: Use v1.5-compatible ownership logic when listing dependents.

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

This restores compatibility between kubectl 1.6 and clusters running Kubernetes 1.5.x. It introduces transitional ownership logic in which the client considers ControllerRef when it exists, but does not require it to exist.

If we were to ignore ControllerRef altogether (pre-1.6 client behavior), we would introduce a new failure mode in v1.6 because controllers that used to get stuck due to selector overlap will now make progress. For example, that means when reaping ReplicaSets of an overlapping Deployment, we would risk deleting ReplicaSets belonging to a different Deployment that we aren't about to delete.

This transitional logic avoids such surprises in 1.6 clusters, and does no worse than kubectl 1.5 did in 1.5 clusters. To prevent this when kubectl 1.5 is used against 1.6 clusters, we can cherrypick this change.

**Which issue this PR fixes**:

Fixes #43159

**Special notes for your reviewer**:

**Release note**:
```release-note
```
2017-03-17 14:25:38 -07:00
Janet Kuo
bca3691029 Use json field names instead of go field names 2017-03-17 14:24:21 -07:00
Janet Kuo
4cebc865dc Update description of fields for DaemonSet rolling udpate 2017-03-17 14:12:00 -07:00