Skip to content

Commit

Permalink
Do not defer goroutine to delete tools node, as this leads to errors (f…
Browse files Browse the repository at this point in the history
…ixes #1006)
  • Loading branch information
iwilltry42 committed Mar 15, 2022
1 parent 1ec9db2 commit 36bbed4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/client/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func GatherEnvironmentInfo(ctx context.Context, runtime runtimes.Runtime, cluste
if err != nil {
return nil, err
}
defer func() {
go NodeDelete(ctx, runtime, toolsNode, k3d.NodeDeleteOpts{SkipLBUpdate: true})
}()
if err := NodeDelete(ctx, runtime, toolsNode, k3d.NodeDeleteOpts{SkipLBUpdate: true}); err != nil {
l.Log().Warnf("Failed to delete tools node '%s'. This is not critical, but may lead to errors down the road. Error: %v", toolsNode.Name, err)
}

if cluster.Network.Name != "host" {
hostIP, err := GetHostIP(ctx, runtime, cluster)
Expand Down

0 comments on commit 36bbed4

Please sign in to comment.