Commit Graph

39223 Commits (92b40dc2f56cf38963ccfea1c3d742b1f361ed66)

Author SHA1 Message Date
Kubernetes Submit Queue 92b40dc2f5 Merge pull request #36848 from jingxu97/Nov/gluster
Automatic merge from submit-queue

Enable NFSv4 and GlusterFS tests on cluster e2e tests

Enable NFSv4 and GlusterFS tests on cluster e2e tests for GCI images
only.
2016-11-16 14:19:24 -08:00
Kubernetes Submit Queue 97945b3fa5 Merge pull request #36884 from feiskyer/fix-cgroup-root
Automatic merge from submit-queue

Fix syntax error in local-up-cluster.sh when CGROUP_ROOT is set

Fix syntax error when `CGROUP_ROOT` is set, or it will complain a following error:

```
hack/local-up-cluster.sh: line 39: CGROUP_ROOT: "": syntax error: operand expected (error token is """")
```

cc/ @derekwaynecarr
2016-11-16 13:42:22 -08:00
Kubernetes Submit Queue 3d64d919e4 Merge pull request #36833 from mandarjog/issue_36652
Automatic merge from submit-queue

Handle Empty clusterCIDR

**What this PR does / why we need it**:
Handles empty clusterCIDR by skipping the corresponding rule.

**Which issue this PR fixes** 
fixes #36652

**Special notes for your reviewer**:
1. Added test to check for presence/absence of XLB to SVC rule
2. Changed an error statement to log rules along with the error string in case of a failure; This ensures that full debug info is available in case of iptables-restore errors.


Empty clusterCIDR causes invalid rules generation.
Fixes issue #36652
2016-11-16 13:42:11 -08:00
Kubernetes Submit Queue f918dd64c4 Merge pull request #36901 from leitzler/issue_36858_SA2003
Automatic merge from submit-queue

Fix SA2003, deferred Lock right after locking

<!--  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**:
Fixes a re-locking right after a lock. This is a part if issue #36858.

**Special notes for your reviewer**:
N/A

**Release note**:
NONE
2016-11-16 13:04:09 -08:00
Kubernetes Submit Queue 1085ce6081 Merge pull request #36768 from yujuhong/recover_from_failure
Automatic merge from submit-queue

dockershim: remove sandbox container upon naming conflicts

We have observed that, after failing to create a container due to "device or
resource busy", docker may end up having inconsistent internal state. One
symptom is that docker will not report the existence of the "failed to create"
container, but if kubelet tries to create a new container with the same name,
docker will error out with a naming conflict message.

To work around this, this commit parses the creation error message and if there
is a naming conflict, it would attempt to remove the existing container.
2016-11-16 12:27:36 -08:00
Kubernetes Submit Queue 922dff3e39 Merge pull request #36820 from kevin-wangzefeng/fix-kubectl-taint-flake
Automatic merge from submit-queue

fix kubectl taint test flake

<!--  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**:
Kubectl taint tests fail often recently, this PR is trying to fix it.

**Which issue this PR fixes**: ref #29503, #32535

**Special notes for your reviewer**:
This PR cannot 100% fix the flake, but just reduce the failing rate, if the two "kubectl taint" tests are running at the same time, it still has chance to fail.
Maybe should mark the tests "Serial" (see also #31906, #36781), but then they won't run for each PR.
2016-11-16 11:48:07 -08:00
Yu-Ju Hong 5c90908eb0 dockershim: remove container upon naming conflicts
We have observed that, after failing to create a container due to "device or
resource busy", docker may end up having inconsistent internal state. One
symptom is that docker will not report the existence of the "failed to create"
container, but if kubelet tries to create a new container with the same name,
docker will error out with a naming conflict message.

To work around this, this commit parses the creation error message and if there
is a naming conflict, it would attempt to remove the existing container.
2016-11-16 10:20:16 -08:00
Kubernetes Submit Queue 0f95b262dc Merge pull request #35460 from humblec/gluster-gid-prov-2
Automatic merge from submit-queue

Use Gid when provisioning Gluster Volumes.

Bug # https://github.com/openshift/origin/issues/11556
2016-11-16 10:15:03 -08:00
Jing Xu afbf5f52e5 Update volumes.go 2016-11-16 10:04:12 -08:00
Wojciech Tyczynski 9fc4dbcacd Merge pull request #36899 from gmarek/constraints
Update API server CPU constraints in the density test
2016-11-16 17:02:15 +01:00
gmarek 0f9c0678b7 Update API server CPU constraints in the density test 2016-11-16 16:33:53 +01:00
Jing Xu 64955959e6 Enable NFSv4 and GlusterFS tests on cluster e2e tests
Enable NFSv4 and GlusterFS tests on cluster e2e tests for GCI images
only.
2016-11-16 07:27:26 -08:00
Humble Chirammal 7a0d219d12 Use Gid when provisioning Gluster Volumes.
BUG # https://github.com/openshift/origin/issues/11556

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2016-11-16 19:43:51 +05:30
Kubernetes Submit Queue 28d273c8b2 Merge pull request #36810 from gmarek/secrets
Automatic merge from submit-queue

Add ServiceAccounts to kubemark

cc @yujuhong
2016-11-16 06:01:30 -08:00
Kubernetes Submit Queue 193622b31f Merge pull request #36728 from feiskyer/sysctls-docs
Automatic merge from submit-queue

CRI: add docs for sysctls

#34830 adds `sysctls` features in CRI, it is based on sandbox annotations, this PR adds docs for it. 

@yujuhong @timstclair @jonboulle
2016-11-16 02:58:42 -08:00
Kubernetes Submit Queue 587cbaf988 Merge pull request #36410 from Random-Liu/avoid-printing-test-result-twice
Automatic merge from submit-queue

Node E2E: Avoid printing test result twice.

This is a problem since long time ago.

`RunSshCommand` includes the command output to the error. If the command running the test fails, the test output will also be included in the error. [The runner prints both the test output and the error](https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/runner/remote/run_remote.go#L270), which leads the test result to be printed twice. (See the [test result](https://storage.googleapis.com/kubernetes-jenkins/logs/kubelet-gce-e2e-ci/10968/build-log.txt) on node tmp-node-e2e-af900a4d-e2e-node-ubuntu-trusty-docker9-v1-image)

This PR changes `RunSshCommand` not to put command output into the error, and leave the caller to decide how to deal with command output when the command fails.
2016-11-16 02:23:12 -08:00
Kubernetes Submit Queue f4a7b64bf1 Merge pull request #36542 from Random-Liu/clarify-cri-user
Automatic merge from submit-queue

CRI: Clarify User in CRI.

Addressed https://github.com/kubernetes/kubernetes/pull/36423#issuecomment-259343135.

This PR clarifies the user related fields in CRI.

One question is that:
What is the meaning of the `run_as_user` field in `LinuxSandboxSecurityContext`?
* **Is it user on the host?** Then it doesn't make sense, user shouldn't care about what users are on the host.
* **Is it user inside the infra container image?** This is how the field is currently used. However, Infra container is docker specific, I'm not sure whether we should expose this in CRI.
* **Is it the default user inside the pod?** It tells runtime that if there is a container (infra container, or some other helper containers like streaming container etc.), if their `user` is not specified, use the default "sandbox user". Then how can we guarantee that infra or helper container image have the `user`?
* **It doesn't make sense?** If we remove it, we are relying on the shim to set right user (maybe always root) for infra or helper containers (if there will be any in the future), I'm not sure whether this is what we expect.

@yujuhong @feiskyer @jonboulle @yifan-gu 
/cc @kubernetes/sig-node
2016-11-16 01:45:37 -08:00
Pengfei Ni 41bb1c6af3 Fix syntax error in local-up-cluster.sh 2016-11-16 17:36:41 +08:00
Kubernetes Submit Queue 679b725fc0 Merge pull request #36793 from janetkuo/cockroachdb-e2e-test
Automatic merge from submit-queue

Add e2e test for CockroachDB statefulset

Refactor the code of statefulset e2e test for clustered applications, and add a test for CockroachDB. 

The yaml file is copied from examples/cockroachdb/

cc @erictune @foxish @kow3ns @kubernetes/sig-apps
2016-11-16 01:07:41 -08:00
Kubernetes Submit Queue 63ae7a02fa Merge pull request #36783 from mml/migrate-debug
Automatic merge from submit-queue

Add debug logging to all etcd migration operations.
2016-11-16 00:31:42 -08:00
Kubernetes Submit Queue 5b95099eea Merge pull request #36780 from yujuhong/use_labels
Automatic merge from submit-queue

e2e pod cleanup test: restrict pods to be assigned to nodes observed …

The test checks the individual kubelet /runningPods endpoint based on the
initial list of nodes it observes. It is important that all pods are
scheduled only onto those nodes. Apply node labels to ensure no stray pods on
other nodes.

This fixes #35197
2016-11-15 23:14:57 -08:00
Kubernetes Submit Queue 723690c5d9 Merge pull request #36822 from mtaufen/gci-not-default-yet-gce
Automatic merge from submit-queue

K8s 1.5 keeps container-vm as default node image on GCE

There is a concern that some GCE users may be running automation that
(a) turns up ephemeral clusters and (b) always uses the latest K8s
release. If any of these workloads fall outside the set supported on
GCI, cutting the release will break the automation. We are therefore
delaying this change until we have provided sufficient warning.

```release-note
K8s 1.5 keeps container-vm as the default node image on GCE for backwards compatibility reasons. Please beware that container-vm is officially deprecated and you should replace it with GCI if at all possible. You can review the migration guide here for more detail: https://cloud.google.com/container-engine/docs/node-image-migration
```

/cc @aronchick @vishh @roberthbailey
2016-11-15 22:39:00 -08:00
Kubernetes Submit Queue fac05d9c81 Merge pull request #36174 from JacobTanenbaum/v2resource_fixes
Automatic merge from submit-queue

V2resource fixes

when using kubectl set resources it resets all resource fields that are not being set.

for example
$ kubectl set resources deployments nginx --limits=cpu=100m

followed by

$ kubectl set resources deployments nginx --limits=memory=256Mi

would result in the nginx deployment only limiting memory at 256Mi with the previous
limit placed on the cpu being wiped out. This behavior is corrected so that each invocation
only modifies fields set in that command and changed the testing so that the desired behavior
is checked.

Also a typo:

you must specify an update to requests or limits or (in the form of --requests/--limits)

corrected to

you must specify an update to requests or limits (in the form of --requests/--limits)

Implemented both the dry run and local flags.

Added test cases to show that both flags are operating as intended.
Removed the print statement "running in local mode" as in PR#35112

The original PR associated with these fixes where reverted due to causing a flake in hack/make-rules/test-cmd.sh, I gave the 'kubectl set resources' tests there own deployment and set the terminationGracePeriodSeconds to 0 and have run test-cmd.sh for hours without hitting the flake
2016-11-15 21:03:06 -08:00
Random-Liu 09bc5e23a6 Avoid printing test result twice. 2016-11-15 18:10:27 -08:00
Tim Hockin 8fefda3bc3 Merge pull request #36854 from thockin/list-generated-files-in-repo
List generated files for the github size munger
2016-11-16 01:55:51 +01:00
Random-Liu 2ce5deb6fd Add separate username field in CRI and use it. 2016-11-15 16:50:02 -08:00
Random-Liu c79b8afe5b Clarify user fields in CRI 2016-11-15 16:50:02 -08:00
Kubernetes Submit Queue fedf17826b Merge pull request #36738 from wojtek-t/fix_rollback_etcd3
Automatic merge from submit-queue

Remove v2 data before etcd rollback

Fix #36555
2016-11-15 16:09:15 -08:00
Kubernetes Submit Queue bfee66124c Merge pull request #36834 from fejta/gotest
Automatic merge from submit-queue

Delete gotest-dockerized

This file moved to kubernetes/test-infra
2016-11-15 16:09:06 -08:00
Kubernetes Submit Queue 0bd5bd60ac Merge pull request #36812 from jakub-d/master
Automatic merge from submit-queue

Change ScheduledJob POD name suffix from hash to Unix Epoch

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

There is a bug in a ScheduledJob POD suffix hash function (#34447). If you generate more than ~20 PODs you will start having collisions. Here is the code which proves that:
```
package main

import "fmt"
import "time"
import "hash/adler32"
import hashutil "k8s.io/kubernetes/pkg/util/hash"

func main() {
        start_time, _ := time.Parse("2006-Jan-02", "2016-Nov-14")
        var hits map[uint32]int = make(map[uint32]int)
        fmt.Println("| Date | Epoch | Hash | Hits |")
        fmt.Println("| --------------- | ---------- | --- | ---- |")
        for i:=0; i<30; i++ {
                dt:=start_time.Add(time.Duration(i*5)*time.Minute)
                hdt:=getTimeHash(dt)
                _, ok := hits[hdt]
                if ! ok {
                        hits[hdt]=0
                }
                hits[hdt]++
                fmt.Printf("| %s | %d | %d | %d  |\n",dt.Format(time.Stamp), dt.Unix(), hdt, hits[hdt])
        }
}

func getTimeHash(tm time.Time) uint32 {
        timeHasher := adler32.New()
        hashutil.DeepHashObject(timeHasher, tm)
        return timeHasher.Sum32()
}
```

The ouptut is:

| Date | Epoch | Hash | Hits |
| --------------- | ---------- | --- | ---- |
| Nov 14 00:00:00 | 1479081600 | 4175643772 | 1  |
| Nov 14 00:05:00 | 1479081900 | **4209853567** | 1  |
| Nov 14 00:10:00 | 1479082200 | **4141499513** | 1  |
| Nov 14 00:15:00 | 1479082500 | 4175709308 | 1  |
| Nov 14 00:20:00 | 1479082800 | 4209919103 | 1  |
| Nov 14 00:25:00 | 1479083100 | 4244128898 | 1  |
| Nov 14 00:30:00 | 1479083400 | 4072621171 | 1  |
| Nov 14 00:35:00 | 1479083700 | 4106830966 | 1  |
| Nov 14 00:40:00 | 1479084000 | 4141040761 | 1  |
| Nov 14 00:45:00 | 1479084300 | 4072686707 | 1  |
| Nov 14 00:50:00 | 1479084600 | 4106896502 | 1  |
| Nov 14 00:55:00 | 1479084900 | 4141106297 | 1  |
| Nov 14 01:00:00 | 1479085200 | 4072752243 | 1  |
| Nov 14 01:05:00 | 1479085500 | 4106962038 | 1  |
| Nov 14 01:10:00 | 1479085800 | 4141171833 | 1  |
| Nov 14 01:15:00 | 1479086100 | 4175381628 | 1  |
| Nov 14 01:20:00 | 1479086400 | 4107027574 | 1  |
| Nov 14 01:25:00 | 1479086700 | 4141237369 | 1  |
| Nov 14 01:30:00 | 1479087000 | 4175447164 | 1  |
| Nov 14 01:35:00 | 1479087300 | 4107093110 | 1  |
| Nov 14 01:40:00 | 1479087600 | 4141302905 | 1  |
| Nov 14 01:45:00 | 1479087900 | 4175512700 | 1  |
| Nov 14 01:50:00 | 1479088200 | 4107158646 | 1  |
| Nov 14 01:55:00 | 1479088500 | 4141368441 | 1  |
| Nov 14 02:00:00 | 1479088800 | 4175578236 | 1  |
| Nov 14 02:05:00 | 1479089100 | 4209788031 | 1  |
| Nov 14 02:10:00 | 1479089400 | 4141433977 | 1  |
| Nov 14 02:15:00 | 1479089700 | 4175643772 | 2  |
| Nov 14 02:20:00 | 1479090000 | **4209853567** | 2  |
| Nov 14 02:25:00 | 1479090300 | **4141499513** | 2  |

This PR is a proposal to abandon hashes and use Unix Epoch times instead.
Cons:
* It's easy to sort PODs this way
* The length of the Epoch time stamp is the same as the length of the current hash
* As it's epoch - we won't have collisions

**Which issue this PR fixes**
fixes #34447
2016-11-15 16:08:55 -08:00
Tim Hockin 69323c3c39 List generated files for the github size munger
This list used to exist in the github munger tree, but that tool should be more
generic.  This needs to live near the code.
2016-11-15 15:47:22 -08:00
Matt Liggett fd289c2d55 Add debug logging to all etcd migration operations. 2016-11-15 15:41:42 -08:00
Mandar U Jog 3fdc343a98 Handle Empty clusterCIDR
Empty clusterCIDR causes invalid rules generation.
Fixes issue #36652
2016-11-15 14:34:25 -08:00
Erick Fejta 92843728bd Delete gotest-dockerized 2016-11-15 13:11:04 -08:00
Kubernetes Submit Queue d51e27fe96 Merge pull request #36294 from madhusudancs/federation-kubefed-init-10d
Automatic merge from submit-queue

[Federation][init-10d] Use the right service names in controller manager.

Please review only the last commit here. This is based on PR #36048 which will be reviewed independently.

Design Doc: PR #34484

cc @kubernetes/sig-cluster-federation @nikhiljindal
2016-11-15 12:49:40 -08:00
Kubernetes Submit Queue f4ea8d70e7 Merge pull request #36830 from mikedanese/doc-fix
Automatic merge from submit-queue

regenerate kubectl certificate docs

@bgrant0607
2016-11-15 12:07:41 -08:00
Kubernetes Submit Queue 09a6da3207 Merge pull request #36741 from wojtek-t/fix_migration_ports
Automatic merge from submit-queue

Fix ports in migration script

This may fix problems with migration that you observed.
2016-11-15 12:07:31 -08:00
Kubernetes Submit Queue d60d9f3269 Merge pull request #36674 from janetkuo/pull-request-template
Automatic merge from submit-queue

Fix PR template

<!--  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**: Fix PR template for closing issues with PRs, see https://github.com/kubernetes/kubernetes/issues/32398#issuecomment-260073026 

cc @ymqytw 

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

**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
```
2016-11-15 11:23:02 -08:00
Kubernetes Submit Queue f0aba3d6fe Merge pull request #35811 from dashpole/garbage_collect_testing
Automatic merge from submit-queue

Garbage collection tests the MaxPerPodContainers and MaxContainers constraints

This is the first version of this test.  It tests that containers are garbage collected according to the default configuration.
2016-11-15 11:22:52 -08:00
Mike Danese 2fd0b74bce regenerate kubectl certificate docs 2016-11-15 11:10:47 -08:00
Kubernetes Submit Queue 98c68947ee Merge pull request #36549 from cjcullen/closetunnel
Automatic merge from submit-queue

Close tunnels after failed healthchecks.

When we fail an ssh-tunnel healthcheck, we currently leak a file descriptor keeping the SSH connection open.

This closes the underlying tunnel before removing our pointer to it. It is possible that the tunnel was functional, but the healthcheck failed for some other reason (e.g. kubelet healthz down), which could close an in-use tunnel, but I think that is acceptable.
2016-11-15 10:42:53 -08:00
Madhusudan.C.S 2f00e0eeba [Federation][init-10d] Use the right service and dns provider names in controller manager. 2016-11-15 10:42:31 -08:00
David Ashpole f6224590f7 Test Container Garbage Collection 2016-11-15 09:15:31 -08:00
Kubernetes Submit Queue 2110f72e4c Merge pull request #36800 from mdshuai/update-cgroups-per-qos
Automatic merge from submit-queue

[kubelet]update some --cgroups-per-qos to --experimental-cgroups-per-qos

Follow https://github.com/kubernetes/kubernetes/pull/36767, there are some fields still need update in docs or hack/local-up-cluster.sh
2016-11-15 08:54:29 -08:00
Michael Taufen 6c5b4761c8 K8s 1.5 keeps container-vm as default node image on GCE
There is a concern that some GCE users may be running automation that
(a) turns up ephemeral clusters and (b) always uses the latest K8s
release. If any of these workloads fall outside the set supported on
GCI, cutting the release will break the automation. We are therefore
delaying this change until we have provided sufficient warning.
2016-11-15 08:34:10 -08:00
Dlugolecki, Jakub d1896a695f Change ScheduledJob POD name suffix from hash to Unix Epoch 2016-11-15 17:25:32 +01:00
gmarek 7439a956ef Add ServiceAccounts to Kubemark 2016-11-15 16:03:48 +01:00
Kevin 6211669a19 fix kubectl taint test flake 2016-11-15 23:02:48 +08:00
Kubernetes Submit Queue 2bd8bb2699 Merge pull request #34873 from k82cn/k8s_34633
Automatic merge from submit-queue

Set non-zero exit code on failures for kubectl

fixes #34633 

/cc @AdoHe
2016-11-15 03:40:53 -08:00
Kubernetes Submit Queue b2cd67c31f Merge pull request #36756 from gmarek/contention
Automatic merge from submit-queue

Add a flag allowing contention profiling of the API server

Useful for performance debugging.

cc @smarterclayton @timothysc @lavalamp

```release-note
Add a flag allowing contention profiling of the API server
```
2016-11-15 03:04:27 -08:00