未验证 提交 fba4de74 编写于 作者: T Thomas Strömberg 提交者: GitHub

Merge pull request #8787 from saltbo/master

fix error usage for the WaitGroup in the pkg addons
......@@ -353,7 +353,6 @@ func verifyAddonStatusInternal(cc *config.ClusterConfig, name string, val string
// Start enables the default addons for a profile, plus any additional
func Start(wg *sync.WaitGroup, cc *config.ClusterConfig, toEnable map[string]bool, additional []string) {
wg.Add(1)
defer wg.Done()
start := time.Now()
......
......@@ -130,7 +130,8 @@ func TestStart(t *testing.T) {
}
var wg sync.WaitGroup
Start(&wg, cc, map[string]bool{}, []string{"dashboard"})
wg.Add(1)
go Start(&wg, cc, map[string]bool{}, []string{"dashboard"})
wg.Wait()
if !assets.Addons["dashboard"].IsEnabled(cc) {
......
......@@ -148,6 +148,7 @@ func Start(starter Starter, apiServer bool) (*kubeconfig.Settings, error) {
// enable addons, both old and new!
if starter.ExistingAddons != nil {
wg.Add(1)
go addons.Start(&wg, starter.Cfg, starter.ExistingAddons, config.AddonList)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册