Skip to content

Commit

Permalink
Merge branch 'bug-fix' into 'master'
Browse files Browse the repository at this point in the history
又是这种 map 没有初始化的错

See merge request !139
  • Loading branch information
CMGS committed Aug 21, 2017
2 parents 9574101 + efabe23 commit 536446c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cluster/calcium/realloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ func (c *calcium) reallocNodesCPU(
if err := c.store.UpdateNode(node); err != nil {
return nil, err
}
if _, ok := nodesCPUMap[cpu]; !ok {
nodesCPUMap[cpu] = NodeCPUMap{}
}
nodesCPUMap[cpu][node] = containersCPUMap
}
}
Expand Down

0 comments on commit 536446c

Please sign in to comment.