From 6d45a15e0540e9668673cfc863d5f489a401f0cf Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Tue, 31 Aug 2021 09:26:51 +0200 Subject: [PATCH] fix/cluster: do not use the same nodestartopts value for all nodes --- pkg/client/cluster.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkg/client/cluster.go b/pkg/client/cluster.go index 7fb5dd74..ff2dacdf 100644 --- a/pkg/client/cluster.go +++ b/pkg/client/cluster.go @@ -875,13 +875,12 @@ func ClusterStart(ctx context.Context, runtime k3drt.Runtime, cluster *k3d.Clust * Server Nodes */ l.Log().Infoln("Starting servers...") - nodeStartOpts := &k3d.NodeStartOpts{ - Wait: true, - NodeHooks: startClusterOpts.NodeHooks, - EnvironmentInfo: startClusterOpts.EnvironmentInfo, - } for _, serverNode := range servers { - if err := NodeStart(ctx, runtime, serverNode, nodeStartOpts); err != nil { + if err := NodeStart(ctx, runtime, serverNode, &k3d.NodeStartOpts{ + Wait: true, + NodeHooks: startClusterOpts.NodeHooks, + EnvironmentInfo: startClusterOpts.EnvironmentInfo, + }); err != nil { return fmt.Errorf("Failed to start server %s: %+v", serverNode.Name, err) } } @@ -896,7 +895,11 @@ func ClusterStart(ctx context.Context, runtime k3drt.Runtime, cluster *k3d.Clust for _, agentNode := range agents { currentAgentNode := agentNode agentWG.Go(func() error { - return NodeStart(aCtx, runtime, currentAgentNode, nodeStartOpts) + return NodeStart(aCtx, runtime, currentAgentNode, &k3d.NodeStartOpts{ + Wait: true, + NodeHooks: startClusterOpts.NodeHooks, + EnvironmentInfo: startClusterOpts.EnvironmentInfo, + }) }) } if err := agentWG.Wait(); err != nil {