Commit Graph

154 Commits

Author SHA1 Message Date
Takeaki Matsumoto
785fac6826 Make updateAllocatedDevices() as a public method and call it in
podresources api
2020-02-07 13:26:56 +09:00
whypro
f4bd4e2e96 Return error instead of panic when cpu manager starts failed. 2019-12-19 21:56:23 +08:00
Kevin Klues
f553286156 Pass initial set of runtime containers to the CPUManager at startup
These information associatedd with these containers is used to migrate
the CPUManager state from it's old format to its new (i.e. keyed off of
podUID and containerName instead of containerID).
2019-12-11 23:02:51 +01:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Kubernetes Prow Robot
73b2c82b28
Merge pull request #83592 from jianzzha/opt-reserved-cpus
added --reserved-cpus kubelet command option
2019-11-06 22:14:42 -08:00
Jianzhu Zhang
89dfd24483 added --reserved-cpus kubelet command option 2019-11-06 07:33:52 -05:00
yuxiaobo
81e9f21f83 Correct spelling mistakes
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2019-11-06 20:25:19 +08:00
zouyee
594fc0f4b9 fix cpumanager reconcileState without sourceready
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-09-25 10:39:06 +08:00
Louise Daly
9a118ceac4 Added stub support for Topology Manager to Device Manager
Co-authored-by: Conor Nolan <conor.nolan@intel.com>
Co-authored-by: Sreemanti Ghosh <sreemanti.ghosh@intel.com>
Co-authored-by: Kevin Klues <kklues@nvidia.com>
2019-08-29 07:45:43 -05:00
Kevin Klues
5660cd3cfb Add NUMA Node awareness to the TopologyManager 2019-08-28 11:04:52 -05:00
Kevin Klues
ecc14fe661 Update CPUManager to include NUMANodeID in CPUTopology
Unfortunately, the NUMA information is not readily available from
cadvisor, so we have to roll the logic to discover it by hand. In the
future, we should remove this custiom code to use the information
provided by cadvisor once it is made available.
2019-08-27 16:51:05 -05:00
Tim Allclair
8a495cb5e4 Clean up error messages (ST1005) 2019-08-21 10:40:21 -07:00
Tim Allclair
3f510c69f6 Remove dead code from pkg/kubelet/... 2019-08-21 10:40:21 -07:00
Kubernetes Prow Robot
f2dd24820a
Merge pull request #73920 from nolancon/topology-manager-cpu-manager
Changes to make CPU Manager a Hint Provider for Topology Manager
2019-08-15 05:44:33 -07:00
Kubernetes Prow Robot
d47f9ff132
Merge pull request #81086 from dims/fix-incorrect-readlink-check-for-checking-kernel-pids
[TOB-K8S-027] Fix Incorrect isKernelPid check
2019-08-08 17:58:04 -07:00
Davanum Srinivas
bd925d6611 [TOB-K8S-027] Fix Incorrect isKernelPid check
isKernelPid should explicitly check the error returned from os.Readlink and return true
only if the error value is ENOENT. Without this fix, if Readlink
returned say ENAMETOOLONG or EACESS, we would still count the process as
a kernel process (which is not true).
2019-08-07 11:19:19 -04:00
Davanum Srinivas
bc71c23bee [TOB-K8S-025] Incorrect docker daemon process name in container manager
The container manager used in kubelet checks for docker daemon process either via pidfile
or process name. While the pidfile points to the docker daemon process PID, the
dockerProcessName constant stores a docker cli name ( docker ) instead of docker daemon
name ( dockerd ).
2019-08-07 10:59:37 -04:00
Conor Nolan
e33af11add Add stub support for TopologyManager to CPUManager
Co-Authored-By: Louise Daly <louise.m.daly@intel.com>
2019-08-07 15:56:05 +02:00
Jianfei Bai
5726b22fbc Move docker specific const to dockershim. 2019-08-05 10:28:08 +08:00
Louise Daly
9f0081cc36 Updates to container manager and internal container lifecycle to accommodate Topology Manager
Co-authored-by: Conor Nolan <conor.nolan@intel.com>
2019-07-24 08:09:38 +01:00
Kubernetes Prow Robot
923f08e29b
Merge pull request #79900 from mikebrow/todo-cleanup-container-manager-linux
update code documentation to reflect change in status
2019-07-11 18:33:35 -07:00
Kubernetes Prow Robot
920ac08361
Merge pull request #76518 from haiyanmeng/limit
Limit the read length of ioutil.ReadAll in `pkg/kubelet` and `pkg/probe`
2019-07-11 17:01:07 -07:00
Kubernetes Prow Robot
f0d1b10092
Merge pull request #77429 from tedyu/container-linux-err
Avoid unnecessary concatenation of errors
2019-07-11 14:33:08 -07:00
Haiyan Meng
1f270ef4e2
Limit the read length of ioutil.ReadAll in pkg/kubelet and pkg/probe
Signed-off-by: Haiyan Meng <haiyanmeng@google.com>
2019-07-11 13:18:06 -07:00
Mike Brown
6da266784a update code documentation to reflect change in status
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2019-07-08 16:15:59 -05:00
Odin Ugedal
9c2aa843bd Remove unnecessary variable declaration 2019-06-28 18:03:23 +02:00
Kubernetes Prow Robot
d30fbab4b8
Merge pull request #77915 from SataQiu/fix-golint-util-20190515
Fix golint failures of pkg/util/parsers pkg/util/sysctl pkg/util/system
2019-06-14 00:29:00 -07:00
Tara Gu
5e18554442 Implement plugin manager - a controller that manages plugin registration/unregistration 2019-05-30 19:00:59 -04:00
Ted Yu
c46ec66a1f Avoid unnecessary concatenation of errors 2019-05-29 17:25:53 -07:00
Richard Chen
c9f1b57b5b Reset extended resources only when node is recreated. 2019-05-21 14:16:54 -07:00
SataQiu
b36d8d431f fix golint failures of pkg/util/parsers pkg/util/sysctl pkg/util/system 2019-05-15 23:19:47 +08:00
WanLinghao
62d8081eda Fix a log info error 2019-03-29 13:27:10 +08:00
Davanum Srinivas
33081c1f07
New staging repository for cri-api
Change-Id: I2160b0b0ec4b9870a2d4452b428e395bbe12afbb
2019-03-26 18:21:04 -04:00
Robert Krawitz
2597a1d97e Implement SupportNodePidsLimit, hand-tested 2019-02-13 14:56:17 -05:00
Andrew Kim
84191eb99b replace pkg/util/file with k8s.io/utils/path 2019-01-29 15:20:13 -05:00
yuexiao-wang
f3353c358d [scheduler cleanup phase 2]: Rename to
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:21:12 +08:00
David Ashpole
630cb53f82 add kubelet grpc server for pod-resources service 2018-11-15 09:43:20 -08:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Benjamin Elder
8b56eb8588 hack/update-gofmt.sh 2018-09-24 12:21:29 -07:00
Benjamin Elder
088cf3c37b find & replace version import 2018-09-24 12:03:24 -07:00
Renaud Gaubert
8dd1d27c03 Updated the device manager pluginwatcher handler 2018-09-06 15:34:46 +02:00
Sandor Szücs
588d2808b7
fix #51135 make CFS quota period configurable, adds a cli flag and config option to kubelet to be able to set cpu.cfs_period and defaults to 100ms as before.
It requires to enable feature gate CustomCPUCFSQuotaPeriod.

Signed-off-by: Sandor Szücs <sandor.szuecs@zalando.de>
2018-09-01 20:19:59 +02:00
Kubernetes Submit Queue
c2536e2b0d
Merge pull request #61159 from linyouchong/linyouchong-20180314
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>.

Skip checking when failSwapOn=false

**What this PR does / why we need it**:
Skip checking when failSwapOn=false

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

**Special notes for your reviewer**:
NONE
**Release note**:
```
NONE
```
2018-08-02 14:09:39 -07:00
vikaschoudhary16
a5842503eb Use probe based plugin discovery mechanism in device manager 2018-07-17 04:02:31 -04:00
Seth Jennings
3234b0fa5b feature gate LSI capacity calculation 2018-06-28 14:01:08 -05:00
Guoliang Wang
761cf41427 Move pkg/scheduler/schedulercache -> pkg/scheduler/cache 2018-05-31 22:55:34 +08:00
Kubernetes Submit Queue
1929e0d86d
Merge pull request #63298 from dims/kubelet-remove-unused-code
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>.

kubelet - Remove unused code

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

Looks like we have a bunch of unused methods. Let's clean them up

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-05-04 04:20:06 -07:00
Filipe Brandenburger
b230fb8ac4 Use a []string for CgroupName, which is a more accurate internal representation
The slice of strings more precisely captures the hierarchic nature of
the cgroup paths we use to represent pods and their groupings.

It also ensures we're reducing the chances of passing an incorrect path
format to a cgroup driver that requires a different path naming, since
now explicit conversions are always needed.

The new constructor NewCgroupName starts from an existing CgroupName,
which enforces a hierarchy where a root is always needed. It also
performs checking on the component names to ensure invalid characters
("/" and "_") are not in use.

A RootCgroupName for the top of the cgroup hierarchy tree is introduced.

This refactor results in a net reduction of around 30 lines of code,
mainly with the demise of ConvertCgroupNameToSystemd which had fairly
complicated logic in it and was doing just too many things.

There's a small TODO in a helper updateSystemdCgroupInfo that was
introduced to make this commit possible. That logic really belongs in
libcontainer, I'm planning to send a PR there to include it there.
(The API already takes a field with that information, only that field is
only processed in cgroupfs and not systemd driver, we should fix that.)

Tested by running the e2e-node tests on both Ubuntu 16.04 (with cgroupfs
driver) and CentOS 7 (with systemd driver.)
2018-05-01 08:29:06 -07:00
Davanum Srinivas
4bacd77321 Remove unused code 2018-04-30 14:57:26 -04:00
Derek Carr
f68f3ff783 Fix cpu cfs quota flag with pod cgroups 2018-03-16 15:27:11 -04:00