Skip to content

Commit

Permalink
Merge pull request #3520 from hashicorp/b-memory-default-incorrect
Browse files Browse the repository at this point in the history
`memory` default is 10, not 300
  • Loading branch information
dadgar committed Nov 10, 2017
2 parents 344d029 + 892f348 commit 55bf685
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (r *Resources) Canonicalize() {
r.CPU = helper.IntToPtr(100)
}
if r.MemoryMB == nil {
r.MemoryMB = helper.IntToPtr(10)
r.MemoryMB = helper.IntToPtr(300)
}
if r.IOPS == nil {
r.IOPS = helper.IntToPtr(0)
Expand Down
9 changes: 4 additions & 5 deletions api/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,10 @@ type Task struct {
}

func (t *Task) Canonicalize(tg *TaskGroup, job *Job) {
min := MinResources()
min.Merge(t.Resources)
min.Canonicalize()
t.Resources = min

if t.Resources == nil {
t.Resources = &Resources{}
}
t.Resources.Canonicalize()
if t.KillTimeout == nil {
t.KillTimeout = helper.TimeToPtr(5 * time.Second)
}
Expand Down

0 comments on commit 55bf685

Please sign in to comment.