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
9170e94e
Commit
9170e94e
authored
Dec 09, 2016
by
Harry Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cgroupParent is wrongly set in dockershim
parent
ae1a7784
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
docker_container.go
pkg/kubelet/dockershim/docker_container.go
+8
-8
No files found.
pkg/kubelet/dockershim/docker_container.go
View file @
9170e94e
...
...
@@ -124,14 +124,6 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi
Binds
:
generateMountBindings
(
config
.
GetMounts
()),
}
// Apply cgroupsParent derived from the sandbox config.
if
lc
:=
sandboxConfig
.
GetLinux
();
lc
!=
nil
{
// Apply Cgroup options.
// TODO: Check if this works with per-pod cgroups.
// TODO: we need to pass the cgroup in syntax expected by cgroup driver but shim does not use docker info yet...
hc
.
CgroupParent
=
lc
.
GetCgroupParent
()
}
// Apply Linux-specific options if applicable.
if
lc
:=
config
.
GetLinux
();
lc
!=
nil
{
// Apply resource options.
...
...
@@ -154,6 +146,14 @@ func (ds *dockerService) CreateContainer(podSandboxID string, config *runtimeapi
applyContainerSecurityContext
(
lc
,
podSandboxID
,
createConfig
.
Config
,
hc
)
}
// Apply cgroupsParent derived from the sandbox config.
if
lc
:=
sandboxConfig
.
GetLinux
();
lc
!=
nil
{
// Apply Cgroup options.
// TODO: Check if this works with per-pod cgroups.
// TODO: we need to pass the cgroup in syntax expected by cgroup driver but shim does not use docker info yet...
hc
.
CgroupParent
=
lc
.
GetCgroupParent
()
}
// Set devices for container.
devices
:=
make
([]
dockercontainer
.
DeviceMapping
,
len
(
config
.
Devices
))
for
i
,
device
:=
range
config
.
Devices
{
...
...
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