revert change to increase min. CPU resource value from 20 to 100

In the commit 622d3ddb92
"Fixed test and moved constants into standalone func" the minimum CPU
resource value for a job was increased from 100 to 20.

This can break the nomad setup for people that used lower CPU
values and are at the maximum MHz value of the available CPU on a
machine.
Change the minimum back to 20 MHz to ensure downwards compatibility.
This commit is contained in:
Fabian Holler
2018-01-02 15:56:02 +01:00
parent da9a1d7bb0
commit 957712c587
2 changed files with 2 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ func DefaultResources() *Resources {
// IN nomad/structs/structs.go and should be kept in sync.
func MinResources() *Resources {
return &Resources{
CPU: helper.IntToPtr(100),
CPU: helper.IntToPtr(20),
MemoryMB: helper.IntToPtr(10),
IOPS: helper.IntToPtr(0),
}

View File

@@ -1253,7 +1253,7 @@ func DefaultResources() *Resources {
// api/resources.go and should be kept in sync.
func MinResources() *Resources {
return &Resources{
CPU: 100,
CPU: 20,
MemoryMB: 10,
IOPS: 0,
}