Commit Graph

3025 Commits (ec6181d5d3cae2238d485ee75332ab9c09b619d9)

Author SHA1 Message Date
k8s-merge-robot 3832b32d08 Merge pull request #27501 from ronnielai/test1
Automatic merge from submit-queue

Log all image deletion errors instead of just the last one

#27169
2016-07-07 00:53:39 -07:00
ronnielai 5d05fbad9b Revert "Declare out of disk when there is no free inodes" 2016-07-06 08:19:09 -07:00
k8s-merge-robot d06359d6a0 Merge pull request #28409 from saad-ali/moveVolumeController
Automatic merge from submit-queue

Reorganize volume controllers and manager

* Move both PV and attach/detach volume controllers to `controllers/volume` (closes #26222)
* Rename `kubelet/volume` to `kubelet/volumemanager`
* Add/update OWNER files
2016-07-02 00:41:02 -07:00
Ron Lai ed1444e47f Log all image deletion errors instead of just the last one 2016-07-01 20:00:05 -07:00
k8s-merge-robot 40b8fb476d Merge pull request #28176 from ronnielai/inode-check-dep
Automatic merge from submit-queue

Declare out of disk when there is no free inodes

#21546
2016-07-01 19:59:00 -07:00
saadali 0dd17fff22 Reorganize volume controllers and manager 2016-07-01 18:50:25 -07:00
k8s-merge-robot 2df9d16a7a Merge pull request #28173 from ronnielai/inode-summary-dep
Automatic merge from submit-queue

Includes the number of free inodes in stat summary

#21546
2016-07-01 18:38:28 -07:00
k8s-merge-robot fb19362e01 Merge pull request #25899 from yujuhong/ncri
Automatic merge from submit-queue

Add a new container runtime interface

This PR includes a proposal and a Go file to re-define the container runtime interface.
This is based on the original doc: https://docs.google.com/document/d/1ietD5eavK0aTuMQTw6-21r67UU73_vqYSUIPFdA0J5Q/

The umbrella issues is #22964

/cc @kubernetes/sig-node
2016-07-01 16:55:44 -07:00
k8s-merge-robot 793b4fea9e Merge pull request #27900 from derekwaynecarr/test_defaults_qos
Automatic merge from submit-queue

Add additional testing scenarios for compute resource requests=0

I was asked about the qos tier of a pod that specified 

`--requests=cpu=0,memory=0 --limits=cpu=100m,memory=1Gi`

and in just investigating current behavior, realized we should have an explicit test case to ensure that 0 values are preserved in defaulting passes, and that this is still a burstable pod (but the lowest for that tier as it related to eviction)

/cc @vishh
2016-07-01 16:16:23 -07:00
Yu-Ju Hong 08dc661133 Container runtime interface
This commit includes a proposal and a Go file to re-define the container
runtime interface.

Note that this is an experimental interface and is expected to go through
multiple revisions once developers start implementing against it. As stated in
the proposal, there are also individual issues to carry discussions of
specific features.
2016-07-01 15:42:11 -07:00
k8s-merge-robot 9470bfd692 Merge pull request #28240 from Random-Liu/add-semver-back
Automatic merge from submit-queue

Kubelet: Add the docker semver back.

Fixes #28221.
This PR:
1) Add the semver back https://github.com/kubernetes/kubernetes/pull/20020
2) Remove the code in https://github.com/kubernetes/kubernetes/pull/20827, because docker 1.8 is not officially supported now, and we want to deprecate it. https://github.com/kubernetes/kubernetes/pull/27208
3) Add a test for docker version comparison.

XRef https://github.com/kubernetes/kubernetes/pull/28223

@yujuhong 
/cc @ingvagabund 

[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/.github/PULL_REQUEST_TEMPLATE.md?pixel)]()
2016-06-30 23:20:56 -07:00
k8s-merge-robot 536622fd07 Merge pull request #27923 from kevinjkj/kevinjkj-patch-2-1
Automatic merge from submit-queue

fix return value
2016-06-30 21:14:15 -07:00
k8s-merge-robot ab37fbf4c2 Merge pull request #28258 from vishh/28231
Automatic merge from submit-queue

[kubelet] Allow opting out of automatic cloud provider detection in kubelet. By default kubelet will auto-detect cloud providers

fixes #28231
2016-06-30 12:27:26 -07:00
Ron Lai e5f8cd9973 Includes the number of free indoes in summary 2016-06-30 10:05:57 -07:00
Ron Lai 8cc6057c63 Declare out of disk when there is no free inodes. 2016-06-30 09:43:36 -07:00
Vishnu Kannan ea789e8612 Allow opting out of automatic cloud provider detection in kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-06-29 18:04:29 -07:00
David McMahon ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Random Liu 7f6d9b3bc6 Add the semver back. 2016-06-29 14:35:12 -07:00
k8s-merge-robot 7f3da674f7 Merge pull request #26680 from olegshaldybin/fake-clientset-registry
Automatic merge from submit-queue

Track object modifications in fake clientset

Fake clientset is used by unit tests extensively but it has some
shortcomings:

- no filtering on namespace and name: tests that want to test objects in
  multiple namespaces end up getting all objects from this clientset,
  as it doesn't perform any filtering based on name and namespace;

- updates and deletes don't modify the clientset state, so some tests
  can get unexpected results if they modify/delete objects using the
  clientset;

- it's possible to insert multiple objects with the same
  kind/name/namespace, this leads to confusing behavior, as retrieval is
  based on the insertion order, but anchors on the last added object as
  long as no more objects are added.

This change changes core.ObjectRetriever implementation to track object
adds, updates and deletes.

Some unit tests were depending on the previous (and somewhat incorrect)
behavior. These are fixed in the following few commits.
2016-06-29 06:04:33 -07:00
k8s-merge-robot 1a1a4709b9 Merge pull request #28093 from dubstack/dubstack-refactor-qos2
Automatic merge from submit-queue

[Refactor] Make QoS naming consistent across the codebase

@derekwaynecarr @vishh PTAL. Can one of you please attach a LGTM.
2016-06-29 02:36:22 -07:00
k8s-merge-robot c6fa861688 Merge pull request #28160 from saad-ali/waitForGracefulTerm
Automatic merge from submit-queue

Volume manager must verify containers terminated before deleting for ungracefully terminated pods

A pod is removed from volume manager (triggering unmount) when it is deleted from the kubelet pod manager. Kubelet deletes the pod from pod manager as soon as it receives a delete pod request. As long as the graceful termination period is non-zero, this happens after kubelet has terminated all containers for the pod. However, when graceful termination period for a pod is set to zero, the volume is deleted from pod manager *before* its containers are terminated.

This  can result in volumes getting unmounted from a pod before all containers have exited when graceful termination is set to zero.

This PR prevents that from happening by only deleting a volume from volume manager once it is deleted from the pod manager AND the kubelet containerRuntime status indicates all containers for the pod have exited. Because we do not want to call containerRuntime too frequently, we introduce a delay in the `findAndRemoveDeletedPods()` method to prevent it from executing more frequently than every two seconds.

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

Running test in tight loop to verify fix.
2016-06-29 01:33:31 -07:00
Saad Ali c723d9e5c4 Volume manager verify containers terminated before deleting 2016-06-28 21:38:59 -07:00
k8s-merge-robot 532491aab6 Merge pull request #28095 from saad-ali/fixRacyVolumesInUse
Automatic merge from submit-queue

Kubelet should mark VolumeInUse before checking if it is Attached

Kubelet should mark VolumeInUse before checking if it is Attached.
Controller should fetch fresh copy of node object before detach instead of relying on node informer cache.

Fixes #27836
2016-06-28 15:59:17 -07:00
saadali e06b32b1ef Mark VolumeInUse before checking if it is Attached
Ensure that kublet marks VolumeInUse before checking if it is Attached.
Also ensures that the attach/detach controller always fetches a fresh
copy of the node object before detach (instead ofKubelet relying on node
informer cache).
2016-06-28 14:05:59 -07:00
Oleg Shaldybin ab6ac7c94e Fix mirror pod identity change test
If mirror pod identity changes it actually doesn't get updated;
previously test was relying on an incorrect record pulled from a fake
clientset.
2016-06-28 11:54:13 -07:00
Dr. Stefan Schimanski 186c6b29c1 Use : as seccomp security option operator for Docker 1.10 2016-06-28 16:44:48 +02:00
derekwaynecarr a04e6f8635 Add additional testing scenarios for compute resource requests=0 2016-06-27 14:38:55 -04:00
k8s-merge-robot db4c943f6d Merge pull request #27800 from derekwaynecarr/fix_filename_typo
Automatic merge from submit-queue

Fix typo in filename

just a simple fix
2016-06-27 09:49:16 -07:00
Jordan Liggitt c202a405cd Fix reference to linux-only struct 2016-06-27 11:13:49 -04:00
k8s-merge-robot ecfd4aa131 Merge pull request #27755 from dubstack/dubstack-cgroup-interface
Automatic merge from submit-queue

Add support for basic QoS and pod level cgroup management

This PR is a WIP and is tied to this upstream issue #27204 
It adds support for creation,deletion and updates of cgroups in Kubernetes.
@vishh PTAL

Please note that the first commit is part of this PR: #27749
cc @kubernetes/sig-node

Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 22:21:15 -07:00
k8s-merge-robot d744fd411f Merge pull request #27598 from xiangpengzhao/optimize_canRunPod
Automatic merge from submit-queue

Refactor func canRunPod

After refactoring, we only need to check `if pod.Spec.SecurityContext == nil` once. The logic is a bit clearer.
2016-06-26 19:41:09 -07:00
Buddha Prakash 4acb64f8bd Make Qos naming consistent across the codebase 2016-06-26 16:19:47 -07:00
Buddha Prakash a5ead79d43 Add support for basic cgroup management 2016-06-26 15:41:34 -07:00
k8s-merge-robot 11c5d22004 Merge pull request #27750 from dims/fix-issue-27730
Automatic merge from submit-queue

Fix pkg/kubelet unit tests fail on OSX

use runtime.GOOS for the OperatingSystem and not hardcode it to linux.

Fixes #27730
2016-06-26 06:56:37 -07:00
k8s-merge-robot d64333419c Merge pull request #27749 from dubstack/dubstack-refactor-qos
Automatic merge from submit-queue

[Refactor] QOS to have QOS Class type for QoS classes

This PR adds a QOSClass type and initializes QOSclass constants for the three QoS classes.
It would be good to use this in all future QOS related features. 
This would be good to have for the (Pod level cgroups isolation proposal)[https://github.com/kubernetes/kubernetes/pull/26751] that i am working on aswell.
@vishh PTAL
 
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-26 06:23:23 -07:00
k8s-merge-robot a43aa608a1 Merge pull request #27508 from aaronlevy/dapi-hostip
Automatic merge from submit-queue

Kubelet can retrieve host IP even when apiserver has not been contacted

fixes https://github.com/kubernetes/kubernetes/issues/26590, fixes https://github.com/kubernetes/kubernetes/issues/6558

Right now the kubelet expects to get the hostIP from the kubelet's local nodeInfo cache. However, this will be empty if there is no api-server (or the apiServer has not yet been contacted).

In the case of static pods, this change means the downward api can now be used to populate hostIP.
2016-06-25 23:29:05 -07:00
k8s-merge-robot ea1248e9f2 Merge pull request #27300 from euank/remove-dead-stack-get
Automatic merge from submit-queue

kubelt: Remove a couple lines of dead code

Presumably that code was added for debugging reasons and never removed. Hopefully.

If it's actually important and there's a good reason to do what looks like a no-op to get pause-the-world behaviour or whatever, I'd hope there'd be a comment.

cc @pwittrock
2016-06-25 20:23:38 -07:00
k8s-merge-robot 151c2249cc Merge pull request #28044 from yifan-gu/bump_rkt
Automatic merge from submit-queue

rkt: Bump required rkt version to 1.9.1.

Bump the rkt version to use the one that fixed the [go-systemd sdjournal issue](https://github.com/coreos/rkt/pull/2837), also match [release doc](https://github.com/kubernetes/kubernetes.github.io/blob/release-1.3/docs/getting-started-guides/rkt/index.md#prerequisite).

cc @kubernetes/sig-rktnetes @kubernetes/sig-node
2016-06-24 22:50:29 -07:00
k8s-merge-robot d50bd9e75c Merge pull request #27996 from ronnielai/gc-threshold
Automatic merge from submit-queue

Image GC logic should compensate for reserved blocks

Calculating the disk usage based on available bytes instead of usage bytes to account for reserved blocks in image GC

#27169
2016-06-24 19:08:36 -07:00
k8s-merge-robot f33188a0d0 Merge pull request #28060 from yifan-gu/fix_stage1_anno
Automatic merge from submit-queue

rkt: Fix the 'privileged' check when stage1 annotation is provided.

Previously when stage1 annotation is provided, we only checks if
the kubelet allows privileged, which is not useful as that is a global
setting.

Instead, we should check if the pod has explicitly set the privileged
security context to 'true'.

cc @kubernetes/sig-rktnetes @kubernetes/sig-node
2016-06-24 17:58:07 -07:00
k8s-merge-robot 6f8a0c61c1 Merge pull request #27208 from yujuhong/min_docker_version
Automatic merge from submit-queue

Bump minimum API version for docker to 1.21

The corresponding docker version is 1.9.x. Dropping support for docker 1.8.

/cc @kubernetes/sig-node
2016-06-24 17:24:19 -07:00
Yifan Gu 8b1b9120c6 rkt: Fix the 'privileged' check when stage1 annotation is provided.
Previously when stage1 annotation is provided, we only checks if
the kubelet allows privileged, which is not useful as that is a global
setting.

Instead, we should check if the pod has explicitly set the privileged
security context to 'true'.
2016-06-24 16:33:12 -07:00
Buddha Prakash c3551ae6cd Refactor qos package
Signed-off-by: Buddha Prakash <buddhap@google.com>
2016-06-24 15:36:04 -07:00
k8s-merge-robot c4aa7ee0b2 Merge pull request #25024 from xiangpengzhao/fix_typos
Automatic merge from submit-queue

Fix typos in docker.go

Fix minor typos in variable name
2016-06-24 13:56:22 -07:00
Yifan Gu 30c913e211 rkt: Bump required rkt version to 1.9.1. 2016-06-24 13:54:32 -07:00
Davanum Srinivas 8beed4cd8d
Fix pkg/kubelet unit tests fail on OSX
Fixes #27730
2016-06-24 15:58:09 -04:00
Ron Lai 038b8797c4 Calculating the disk usage based on available bytes instead of usage bytes to account for reserved blocks in image GC 2016-06-23 21:41:33 -07:00
k8s-merge-robot 8ed6c8eeb8 Merge pull request #27914 from yifan-gu/fix_kubenet_hostport
Automatic merge from submit-queue

kubenet: Fix host port for rktnetes.

Because rkt pod runs after plugin.SetUpPod() is called, so
getRunningPods() does not return the newly created pod, which
causes the hostport iptable rules to be missing for this new pod.

cc @dcbw @freehan 

A follow up fix for https://github.com/kubernetes/kubernetes/pull/27878#issuecomment-227898936
2016-06-23 18:48:45 -07:00
Yifan Gu 9140ce07bc kubenet: Fix host port for rktnetes.
Because rkt pod runs after plugin.SetUpPod() is called, so
getRunningPods() does not return the newly created pod, which
causes the hostport iptable rules to be missing for this new pod.
2016-06-23 13:17:01 -07:00
Yu-Ju Hong 07b8c61274 Bump minimum API version for docker to 1.21
The corresponding docker version is 1.9.x. Dropping support for docker 1.8.
2016-06-23 10:21:54 -07:00