Check for invalid CPU limit for cgroups
This commit is contained in:
parent
8582b4d7f9
commit
489b9a925b
|
@ -196,6 +196,10 @@ func (e *LinuxExecutor) configureCgroups(resources *structs.Resources) error {
|
|||
}
|
||||
|
||||
if resources.CPU > 0.0 {
|
||||
if resources.CPU < 2.0 {
|
||||
return fmt.Errorf("resources.CPU must be equal to or greater than 2.0: %v", resources.CPU)
|
||||
}
|
||||
|
||||
// Set the relative CPU shares for this cgroup.
|
||||
// The simplest scale is 1 share to 1 MHz so 1024 = 1GHz. This means any
|
||||
// given process will have at least that amount of resources, but likely
|
||||
|
|
Loading…
Reference in a new issue