Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4e002eac
Commit
4e002eac
authored
May 08, 2017
by
Derek Carr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not fail cgroup exists checks for unknown controllers
parent
448f8501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
cgroup_manager_linux.go
pkg/kubelet/cm/cgroup_manager_linux.go
+13
-1
No files found.
pkg/kubelet/cm/cgroup_manager_linux.go
View file @
4e002eac
...
...
@@ -227,8 +227,20 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
// Get map of all cgroup paths on the system for the particular cgroup
cgroupPaths
:=
m
.
buildCgroupPaths
(
name
)
// the presence of alternative control groups not known to runc confuses
// the kubelet existence checks.
// ideally, we would have a mechaninsm in runc to support Exists() logic
// scoped to the set control groups it understands. this is being discussed
// in https://github.com/opencontainers/runc/issues/1440
// once resolved, we can remove this code.
whitelistControllers
:=
sets
.
NewString
(
"cpu"
,
"cpuacct"
,
"cpuset"
,
"memory"
,
"hugetlb"
,
"systemd"
)
// If even one cgroup path doesn't exist, then the cgroup doesn't exist.
for
_
,
path
:=
range
cgroupPaths
{
for
controller
,
path
:=
range
cgroupPaths
{
// ignore mounts we dont care about
if
!
whitelistControllers
.
Has
(
controller
)
{
continue
}
if
!
libcontainercgroups
.
PathExists
(
path
)
{
return
false
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment