Project

General

Profile

Bug #8096

Core count can cause "numerical result out of range" error due to off-by-one error

Added by Dominic Cleal almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

On a single core VM, I tried to create a container when specifying a core count of 1, but get the following error when starting the container:

Error - Cannot start container 54981773be64869adb7bac933a15df8245bc4182fce2c299133357eebce11fa8: write /sys/fs/cgroup/cpuset/docker-54981773be64869adb7bac933a15df8245bc4182fce2c299133357eebce11fa8/cpuset.cpus: numerical result out of range

cgroup cpusets are counted from zero IIRC, so if core count is meant to equate to a cpuset, it should probably have 1 subtracted from the number selected.

If I change the form to start from zero, then I can select zero CPUs and the container seems to start.

Associated revisions

Revision 8d871e1b (diff)
Added by Daniel Lobato Garcia almost 8 years ago

Fixes #8096 #8097: Improve cpuset cpushare form

Revision 8d871e1b (diff)
Added by Daniel Lobato Garcia almost 8 years ago

Fixes #8096 #8097: Improve cpuset cpushare form

History

#1 Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-docker/pull/38 added
  • Pull request deleted ()

#2 Updated by Daniel Lobato Garcia almost 8 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF