diff --git a/pkg/actuators/machine/actuator.go b/pkg/actuators/machine/actuator.go index 08244792d1..833ce1e0b4 100644 --- a/pkg/actuators/machine/actuator.go +++ b/pkg/actuators/machine/actuator.go @@ -434,7 +434,7 @@ func (a *Actuator) Update(context context.Context, cluster *clusterv1.Cluster, m // Parent controller should prevent this from ever happening by calling Exists and then Create, // but instance could be deleted between the two calls. if existingLen == 0 { - if machine.Spec.ProviderID != nil && (machine.Status.LastUpdated == nil || machine.Status.LastUpdated.Add(requeueAfterSeconds*time.Second).After(time.Now())) { + if machine.Spec.ProviderID != nil && *machine.Spec.ProviderID != "" && (machine.Status.LastUpdated == nil || machine.Status.LastUpdated.Add(requeueAfterSeconds*time.Second).After(time.Now())) { glog.Infof("%s: Possible eventual-consistency discrepancy; returning an error to requeue", machine.Name) return &clustererror.RequeueAfterError{RequeueAfter: requeueAfterSeconds * time.Second} } @@ -507,7 +507,7 @@ func (a *Actuator) Describe(cluster *clusterv1.Cluster, machine *machinev1.Machi return nil, err } if len(instances) == 0 { - if machine.Spec.ProviderID != nil && (machine.Status.LastUpdated == nil || machine.Status.LastUpdated.Add(requeueAfterSeconds*time.Second).After(time.Now())) { + if machine.Spec.ProviderID != nil && *machine.Spec.ProviderID != "" && (machine.Status.LastUpdated == nil || machine.Status.LastUpdated.Add(requeueAfterSeconds*time.Second).After(time.Now())) { glog.Infof("%s: Possible eventual-consistency discrepancy; returning an error to requeue", machine.Name) return nil, &clustererror.RequeueAfterError{RequeueAfter: requeueAfterSeconds * time.Second} }