Commit Graph

86 Commits

Author SHA1 Message Date
lichuqiang
ebd445eb8c add admission handler for device resources allocation 2017-11-02 09:17:48 +08:00
Jiaying Zhang
ff4e8d429e Device plugin code refactoring to cope with file move.
While moving device_plugin_handler_test.go from pkg/kubelet/cm/ to
pkg/kubelet/cm/deviceplugin/, we can no longer uses cm in its tests
because that would cause a cycle dependency. To solve this problem,
I moved the main cm GetResources functionality as well as part of the
current device plugin handler Allocate functionality into a new device
plugin handler function, GetDeviceRunContainerOptions(). This
refactoring is also needed by another PR 51895 that moves device
allocation into admission phase. Now device plugin handler Allocate()
first checks whether there is cached device runtime state and only
issues Allocate grpc call if there is no cached state available.
The new GetDeviceRunContainerOptions() function simply returns device
runtime config from the cached state. To support this change, extended the
podDevices struct and checkpoint data structure with device runtime state.
2017-10-24 14:38:15 -07:00
Vishnu kannan
18eee1eaa0 Make AllocateResponse artifacts global across all devices per container in device plugin API
There is no use case known for passing artifacts per device as it currently exists. The current API is also
complex to use for simple clients. Hence this PR creates a flat namespace where artifacts like environment variables
and mount points apply globally to all devices returned as part of AllocateResponse proto.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-10-19 10:34:00 -07:00
Kubernetes Submit Queue
1d8f1e268f Merge pull request #47699 from supereagle/fix-typos
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix typos: remove duplicated word in comments

**What this PR does / why we need it**: Remove the duplicated word `the` in comments

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

**Special notes for your reviewer**:

```release-note
NONE
```
2017-10-17 02:35:52 -07:00
Euan Kemp
7aa88b5103 kubelet/cm: remove unneeded fork of 'cat'
Reading a file in Go is perfectly possible without invoking cat.

I also removed an outdated comment.
2017-10-10 21:53:35 -07:00
supereagle
87c29a08e1 fix typos: remove duplicated word in comments 2017-09-16 14:38:10 +08:00
Connor Doyle
81ccd396d7 Fixed nil InternalContainerLifecycle in cm stubs. 2017-09-04 07:24:59 -07:00
Connor Doyle
ec706216e6 Un-revert "CPU manager wiring and none policy"
This reverts commit 8d2832021a.
2017-09-04 07:24:59 -07:00
Jiaying Zhang
02001af752 Kubelet side extension to support device allocation 2017-09-01 11:56:35 -07:00
Renaud Gaubert
c4a1c97329 Device Plugin Kubelet integration 2017-09-01 11:47:09 -07:00
Shyam JVS
8d2832021a Revert "CPU manager wiring and none policy" 2017-09-01 18:17:36 +02:00
Connor Doyle
50674ec614 Added cpu-manager-reconcile-period config.
- Defaults to sync-frequency.
2017-08-30 23:42:32 -07:00
Connor Doyle
7c6e31617d CPU Manager initialization and lifecycle calls. 2017-08-30 08:50:41 -07:00
NickrenREN
27901ad5df Change eviction policy to manage one single local storage resource 2017-08-26 05:14:49 +08:00
NickrenREN
eadb7ca8c0 Fix node allocatable resource validation
GetNodeAllocatableReservation gets all the reserved resource, and we need to compare it with capacity
2017-08-14 10:20:40 +08:00
Davanum Srinivas
71e8c8eba4 Fail on swap enabled and deprecate experimental-fail-swap-on flag
* Deprecate the old experimental-fail-swap-on
* Add a new flag fail-swap-on and set it to true

Before this change, we would not fail when swap is on. With this
change we fail for everyone when swap is on, unless they explicitly
set --fail-swap-on to false.
2017-08-02 16:20:01 -04:00
xiangpengzhao
01daf707c5 Refactor: pkg/util into sub-pkgs 2017-07-18 14:34:08 +08:00
Jing Xu
9606a54049 Fix issue when setting fileysystem capacity in container manager
In Container manager, we set up the capacity by retrieving information
from cadvisor. However unlike machineinfo, filesystem information is
available at a later unknown time. This PR uses a go routine to keep
retriving the information until it is avaialble or timeout.
2017-07-10 16:43:18 -07:00
Vishnu kannan
82f7820066 Kubelet:
Centralize Capacity discovery of standard resources in Container manager.
Have storage derive node capacity from container manager.
Move certain cAdvisor interfaces to the cAdvisor package in the process.

This patch fixes a bug in container manager where it was writing to a map without synchronization.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2017-06-27 18:45:02 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Kubernetes Submit Queue
69342bd1df Merge pull request #43005 from cmluciano/cml/consolidatesysctl
Automatic merge from submit-queue (batch tested with PRs 43005, 46660, 46385, 46991, 47103)

Consolidate sysctl commands for kubelet

**What this PR does / why we need it**:
These commands are important enough to be in the Kubelet itself.
By default, Ubuntu 14.04 and Debian Jessie have these set to 200 and
20000. Without this setting, nodes are limited in the number of
containers that they can start.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #26005 

**Special notes for your reviewer**:
I had a difficult time writing tests for this. It is trivial to create a fake sysctl for testing, but the Kubelet does not have any tests for the prior settings.
**Release note**:

```release-note
```
2017-06-07 13:30:54 -07:00
Yu-Ju Hong
daa329c9ae Remove the deprecated --enable-cri flag
Except for rkt, CRI is the default and only integration point for
container runtimes.
2017-05-10 13:03:41 -07:00
Kubernetes Submit Queue
b5831357dc Merge pull request #45305 from jwforres/fix-error-msg-spelling
Automatic merge from submit-queue (batch tested with PRs 43006, 45305, 45390, 45412, 45392)

Fix spelling in container manager error message
2017-05-05 16:39:06 -07:00
Jessica Forrester
bd64b3b15c
Fix spelling in container manager error message 2017-05-03 16:08:16 -04:00
Christopher M. Luciano
bafabcbb44
Consolidate sysctl commands for kubelet
These commands are important enough to be in the Kubelet itself.
By default, Ubuntu 14.04 and Debian Jessie have these set to 200 and
20000. Without this setting, nodes are limited in the number of
containers that they can start.
2017-05-02 12:15:01 -07:00
Manjunath A Kumatagi
f8063879a0 Use Docker API Version instead of docker version 2017-04-27 10:05:22 -04:00
Seth Jennings
ebb1243aba refactor getPidsForProcess and change error handling 2017-03-28 11:34:49 -05:00
Seth Jennings
cc50aa9dfb kubelet: enable qos-level memory request reservation 2017-03-02 15:04:13 -06:00
Seth Jennings
b9adb66426 kubelet: cm: refactor QoS logic into seperate interface 2017-02-28 09:19:29 -06:00
Vishnu Kannan
cc5f5474d5 add support for node allocatable phase 2 to kubelet
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2017-02-27 21:24:44 -08:00
Kubernetes Submit Queue
28a8d783e6 Merge pull request #41621 from derekwaynecarr/best-effort-qos-shares
Automatic merge from submit-queue

BestEffort QoS class has min cpu shares

**What this PR does / why we need it**:
BestEffort QoS class is given the minimum amount of CPU shares per the QoS design.
2017-02-26 06:32:43 -08:00
Derek Carr
43ae6f49ad Enable per pod cgroups, fix defaulting of cgroup-root when not specified 2017-02-21 16:34:22 -05:00
Derek Carr
9a1e30f776 BestEffort QoS class has min cpu shares 2017-02-20 12:28:00 -05:00
Derek Carr
04a909a257 Rename cgroups-per-qos flag to not be experimental 2017-02-03 17:10:53 -05:00
Dr. Stefan Schimanski
bc6fdd925d pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
deads2k
6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Seth Jennings
4c30459e49 switch from local qos types to api types 2017-01-10 10:54:30 -06:00
Dan Winship
c788793868 Port remaining code to pkg/util/version 2016-12-13 08:53:24 -05:00
Chao Xu
5e1adf91df cmd/kubelet 2016-11-23 15:53:09 -08:00
mdshuai
2189acdd4f [kubelet]update --cgroups-per-qos to --experimental-cgroups-per-qos 2016-11-15 15:55:47 +08:00
Tim St. Clair
cb588e823c
Fix getting cgroup pids 2016-11-10 13:08:17 -08:00
Michael Taufen
0c6c622434 Fail kubelet creation if swap enabled
Provides an opt-in flag, --experimental-fail-swap-on (and corresponding
KubeletConfiguration value, ExperimentalFailSwapOn), which is false by default.
2016-11-08 08:39:31 -08:00
Yu-Ju Hong
dcce768a3e Rename experimental-runtime-integration-type to experimental-cri 2016-11-07 11:29:24 -08:00
derekwaynecarr
42289c2758 pod and qos level cgroup support 2016-11-02 08:07:04 -04:00
Yu-Ju Hong
87aaf4c0ac dockershim: move docker to the given cgruop
This change add a container manager inside the dockershim to move docker daemon
and associated processes to a specified cgroup. The original kubelet container
manager will continue checking the name of the cgroup, so that kubelet know how
to report runtime stats.
2016-11-01 11:39:20 -07:00
Vish Kannan
a1fe3adbc7 Revert "Revert "[kubelet] Fix oom-score-adj policy in kubelet"" 2016-09-16 16:32:58 -07:00
Vish Kannan
492ca3bc9c Revert "[kubelet] Fix oom-score-adj policy in kubelet" 2016-09-15 19:28:59 -07:00
Vishnu kannan
ba6feb2771 fix kubelet ignoring docker daemon in container feature
Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 12:43:59 -07:00
Vishnu kannan
e4acad7afb Fix oom-score-adj policy in kubelet.
Docker daemon and kubelet needs to be protected by setting oom-score-adj to -999.

Signed-off-by: Vishnu kannan <vishnuk@google.com>
2016-09-14 11:56:10 -07:00