Skip to content

Commit

Permalink
Update nodepool.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Cecile Robert-Michon committed Jan 21, 2021
1 parent 107126c commit 0cfefb4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/infrastructure/docker/exp/docker/nodepool.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ func (np *NodePool) reconcileMachine(ctx context.Context, machine *docker.Machin
if err := externalMachine.ExecBootstrap(timeoutctx, bootstrapData); err != nil {
return ctrl.Result{}, errors.Wrapf(err, "failed to exec DockerMachinePool instance bootstrap for instance named %s", machine.Name())
}

timeoutctx, cancel = context.WithTimeout(ctx, 1*time.Minute)
defer cancel()
// Check for bootstrap success
if err := externalMachine.CheckForBootstrapSuccess(timeoutctx); err != nil {
return ctrl.Result{}, errors.Wrap(err, "failed to check for existence of bootstrap success file at /run/cluster-api/bootstrap-success.complete")
}

machineStatus.Bootstrapped = true
// return to surface the machine has been bootstrapped.
return ctrl.Result{Requeue: true}, nil
Expand Down

0 comments on commit 0cfefb4

Please sign in to comment.