New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update runc to 9c2d8d184e5da67c95d601382adf14862e4f2228 #31736

Merged
merged 1 commit into from Mar 12, 2017

Conversation

Projects
None yet
6 participants
@mlaventure
Contributor

mlaventure commented Mar 10, 2017

This fix a conflict with systemd daemon-reload (see
opencontainers/runc#1344)

Signed-off-by: Kenfe-Mickael Laventure mickael.laventure@gmail.com

--

Closes #30121

diff --git a/libcontainer/cgroups/systemd/apply_systemd.go b/libcontainer/cgroups/systemd/apply_systemd.go
index fd428f9..7ce066c 100644
--- a/libcontainer/cgroups/systemd/apply_systemd.go
+++ b/libcontainer/cgroups/systemd/apply_systemd.go
@@ -269,6 +269,13 @@ func (m *Manager) Apply(pid int) error {
                        newProp("CPUShares", uint64(c.Resources.CpuShares)))
        }
 
+       // cpu.cfs_quota_us and cpu.cfs_period_us are controlled by systemd.
+       if c.Resources.CpuQuota != 0 && c.Resources.CpuPeriod != 0 {
+               cpuQuotaPerSecUSec := c.Resources.CpuQuota * 1000000 / c.Resources.CpuPeriod
+               properties = append(properties,
+                       newProp("CPUQuotaPerSecUSec", uint64(cpuQuotaPerSecUSec)))
+       }
+
        if c.Resources.BlkioWeight != 0 {
                properties = append(properties,
                        newProp("BlockIOWeight", uint64(c.Resources.BlkioWeight)))
@thaJeztah

LGTM

@cpuguy83

LGTM

Update runc to 9c2d8d184e5da67c95d601382adf14862e4f2228
This fix a conflict with systemd daemon-reload (see
opencontainers/runc#1344)

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
@vieux

This comment has been minimized.

Show comment
Hide comment
@vieux

vieux Mar 10, 2017

Collaborator

rebased.

Collaborator

vieux commented Mar 10, 2017

rebased.

@mlaventure

This comment has been minimized.

Show comment
Hide comment
@mlaventure

mlaventure Mar 10, 2017

Contributor

Thanks!

Contributor

mlaventure commented Mar 10, 2017

Thanks!

@vdemeester vdemeester merged commit 613334e into moby:master Mar 12, 2017

7 checks passed

dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 31560 has succeeded
Details
janky Jenkins build Docker-PRs 40194 has succeeded
Details
powerpc Jenkins build Docker-PRs-powerpc 261 has succeeded
Details
vendor Jenkins build Docker-PRs-vendor 2968 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 11259 has succeeded
Details
z Jenkins build Docker-PRs-s390x 142 has succeeded
Details

@GordonTheTurtle GordonTheTurtle added this to the 17.04.0 milestone Mar 12, 2017

@mlaventure mlaventure deleted the mlaventure:update-runc branch Mar 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment