@@ -58,8 +58,8 @@ const (
58
58
)
59
59
60
60
/*
61
- SECTION
62
- Machine controller - Machine add, update, delete watches
61
+ SECTION
62
+ Machine controller - Machine add, update, delete watches
63
63
*/
64
64
func (c * controller ) addMachine (obj interface {}) {
65
65
klog .V (4 ).Infof ("Adding machine object" )
@@ -247,8 +247,8 @@ func (c *controller) reconcileClusterMachine(machine *v1alpha1.Machine) error {
247
247
}
248
248
249
249
/*
250
- SECTION
251
- Machine controller - nodeToMachine
250
+ SECTION
251
+ Machine controller - nodeToMachine
252
252
*/
253
253
func (c * controller ) addNodeToMachine (obj interface {}) {
254
254
node := obj .(* corev1.Node )
@@ -515,12 +515,16 @@ func (c *controller) machineCreate(machine *v1alpha1.Machine, driver driver.Driv
515
515
actualProviderID = providerID
516
516
}
517
517
}
518
+ var timeoutActive bool
518
519
if actualProviderID == "" {
519
520
actualProviderID , nodeName , err = driver .Create ()
520
521
var e drivers.CreateError
521
522
if errors .As (err , & e ) && e .HasSideEffects () && actualProviderID != "" {
522
523
klog .Errorf ("Side-effects left, applying machineID %q to Machine object" , actualProviderID )
523
524
525
+ // Without this, the machine object will be stuck in a CrashLoopBackOff state forever
526
+ timeoutActive = true
527
+
524
528
for {
525
529
machineName := machine .Name
526
530
@@ -555,7 +559,7 @@ func (c *controller) machineCreate(machine *v1alpha1.Machine, driver driver.Driv
555
559
}
556
560
currentStatus := v1alpha1.CurrentStatus {
557
561
Phase : v1alpha1 .MachineCrashLoopBackOff ,
558
- TimeoutActive : false ,
562
+ TimeoutActive : timeoutActive ,
559
563
LastUpdateTime : metav1 .Now (),
560
564
}
561
565
c .updateMachineStatus (machine , lastOperation , currentStatus )
@@ -1100,8 +1104,8 @@ func (c *controller) deleteMachineFinalizers(machine *v1alpha1.Machine) {
1100
1104
}
1101
1105
1102
1106
/*
1103
- SECTION
1104
- Helper Functions
1107
+ SECTION
1108
+ Helper Functions
1105
1109
*/
1106
1110
func (c * controller ) isHealthy (machine * v1alpha1.Machine ) bool {
1107
1111
numOfConditions := len (machine .Status .Conditions )
0 commit comments