File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,11 @@ func (c *Cluster) ensureClusterExists(ctx context.Context) (newKubeconfig []byte
203203 // wait for the control plane node to be up and running
204204 timeLeft := c .initWait
205205 for {
206+ if timeLeft <= 0 {
207+ c .logger .Errorf ("Control plane at %s did not respond in time, exiting" , clusterAccessIP )
208+ return nil , fmt .Errorf ("control plane at %s did not respond in time" , clusterAccessIP )
209+ }
210+
206211 c .logger .Infof ("Waiting %s for control plane node to be up and running..." , timeLeft )
207212 sleepTime := 30 * time .Second
208213 time .Sleep (sleepTime )
@@ -247,10 +252,6 @@ func (c *Cluster) ensureClusterExists(ctx context.Context) (newKubeconfig []byte
247252 c .logger .Infof ("Control plane at %s is up and running" , clusterAccessIP )
248253 break
249254 }
250- if timeLeft <= 0 {
251- c .logger .Errorf ("Control plane at %s did not respond in time, exiting" , clusterAccessIP )
252- return nil , fmt .Errorf ("control plane at %s did not respond in time" , clusterAccessIP )
253- }
254255 }
255256 // attach the floating IP to the control plane node, if not done already
256257 if ! fipAttached {
You can’t perform that action at this time.
0 commit comments