Skip to content

Commit a3413dd

Browse files
committed
Do not defer goroutine to delete tools node, as this leads to errors (fixes #1006)
1 parent 1ec9db2 commit a3413dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/client/environment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ func GatherEnvironmentInfo(ctx context.Context, runtime runtimes.Runtime, cluste
4646
if err != nil {
4747
return nil, err
4848
}
49-
defer func() {
50-
go NodeDelete(ctx, runtime, toolsNode, k3d.NodeDeleteOpts{SkipLBUpdate: true})
51-
}()
49+
if err := NodeDelete(ctx, runtime, toolsNode, k3d.NodeDeleteOpts{SkipLBUpdate: true}); err != nil {
50+
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)
51+
}
5252

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

0 commit comments

Comments
 (0)