Skip to content

Commit f761109

Browse files
author
zhangye
committed
Merge branch 'dev' into 'master'
bug fix: specs turned into 0xffffffffffffffff and make eru-core crash 因为 `createContainerWithCPUPeriod` 在创建 `goroutine` 之后就退出了, `specs` 被销毁了,所以导致这个错误。但是根据情况不同可能会在销毁前执 行 `doCreateContainerWithCPUPeriod` 导致这个 bug 时隐时现. See merge request !18
2 parents 3ca517a + fddffa3 commit f761109

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.7.5
1+
0.7.6

cluster/calcium/create_container.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (c *calcium) createContainerWithCPUPeriod(specs types.Specs, opts *types.De
4747
return ch, err
4848
}
4949

50-
go func() {
50+
go func(specs types.Specs, plan map[string]int, opts *types.DeployOptions) {
5151
wg := sync.WaitGroup{}
5252
wg.Add(len(plan))
5353
for nodename, num := range plan {
@@ -60,7 +60,7 @@ func (c *calcium) createContainerWithCPUPeriod(specs types.Specs, opts *types.De
6060
}
6161
wg.Wait()
6262
close(ch)
63-
}()
63+
}(specs, plan, opts)
6464

6565
return ch, nil
6666
}

0 commit comments

Comments
 (0)