diff --git a/pkg/actuators/machine/reconciler.go b/pkg/actuators/machine/reconciler.go index 125a0d427e..dc95fda0bf 100644 --- a/pkg/actuators/machine/reconciler.go +++ b/pkg/actuators/machine/reconciler.go @@ -181,7 +181,7 @@ func (r *Reconciler) update() error { existingLen := len(existingInstances) if existingLen == 0 { - if r.machine.Spec.ProviderID != nil && *r.machine.Spec.ProviderID != "" && len(r.machine.Status.Addresses) == 0 { + if r.machine.Spec.ProviderID != nil && *r.machine.Spec.ProviderID != "" && len(r.machine.Status.Addresses) == 0 && (r.machine.Status.LastUpdated == nil || r.machine.Status.LastUpdated.Add(requeueAfterSeconds*time.Second).After(time.Now())) { klog.Infof("%s: Possible eventual-consistency discrepancy; returning an error to requeue", r.machine.Name) return &machinecontroller.RequeueAfterError{RequeueAfter: requeueAfterSeconds * time.Second} } @@ -257,7 +257,7 @@ func (r *Reconciler) exists() (bool, error) { } if len(existingInstances) == 0 { - if r.machine.Spec.ProviderID != nil && *r.machine.Spec.ProviderID != "" && len(r.machine.Status.Addresses) == 0 { + if r.machine.Spec.ProviderID != nil && *r.machine.Spec.ProviderID != "" && len(r.machine.Status.Addresses) == 0 && (r.machine.Status.LastUpdated == nil || r.machine.Status.LastUpdated.Add(requeueAfterSeconds*time.Second).After(time.Now())) { klog.Infof("%s: Possible eventual-consistency discrepancy; returning an error to requeue", r.machine.Name) return false, &machinecontroller.RequeueAfterError{RequeueAfter: requeueAfterSeconds * time.Second} }