Skip to content

Commit

Permalink
Fix systemd cgroup after memory type changed
Browse files Browse the repository at this point in the history
Fixes: #1557

I'm not quite sure about the root cause, looks like
systemd still want them to be uint64.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
  • Loading branch information
hqhq committed Aug 25, 2017
1 parent ae29480 commit acaf689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcontainer/cgroups/systemd/apply_systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ func (m *Manager) Apply(pid int) error {

if c.Resources.Memory != 0 {
properties = append(properties,
newProp("MemoryLimit", c.Resources.Memory))
newProp("MemoryLimit", uint64(c.Resources.Memory)))
}

if c.Resources.CpuShares != 0 {
Expand Down

0 comments on commit acaf689

Please sign in to comment.