Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/controller/machineset/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ func (r *ReconcileMachineSet) Reconcile(request reconcile.Request) (reconcile.Re
return reconcile.Result{}, errors.Wrap(err, "failed to update machine set status")
}

if syncErr != nil {
return reconcile.Result{}, errors.Wrapf(syncErr, "failed to sync machines")
}

var replicas int32
if updatedMS.Spec.Replicas != nil {
replicas = *updatedMS.Spec.Replicas
Expand All @@ -217,7 +221,7 @@ func (r *ReconcileMachineSet) Reconcile(request reconcile.Request) (reconcile.Re
// exceeds MinReadySeconds could be incorrect.
// To avoid an available replica stuck in the ready state, we force a reconcile after MinReadySeconds,
// at which point it should confirm any available replica to be available.
if syncErr == nil && updatedMS.Spec.MinReadySeconds > 0 &&
if updatedMS.Spec.MinReadySeconds > 0 &&
updatedMS.Status.ReadyReplicas == replicas &&
updatedMS.Status.AvailableReplicas != replicas {

Expand Down