Skip to content
Closed
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions pkg/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,6 @@ func (optr *Operator) handleErr(err error, key interface{}) {
return
}

optr.syncFailingStatus(err)

if optr.queue.NumRequeues(key) < maxRetries {
glog.V(2).Infof("Error syncing operator %v: %v", key, err)
optr.queue.AddRateLimited(key)
Expand All @@ -251,6 +249,7 @@ func (optr *Operator) handleErr(err error, key interface{}) {
utilruntime.HandleError(err)
glog.V(2).Infof("Dropping operator %q out of the queue: %v", key, err)
optr.queue.Forget(key)
optr.queue.AddAfter(key, 1*time.Minute)
}

func (optr *Operator) sync(key string) error {
Expand Down
38 changes: 10 additions & 28 deletions pkg/operator/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,37 +322,19 @@ func (optr *Operator) syncRequiredMachineConfigPools(config renderConfig) error
if err != nil {
return err
}
var lastErr error
if err := wait.Poll(time.Second, 10*time.Minute, func() (bool, error) {
pools, err := optr.mcpLister.List(sel)
if apierrors.IsNotFound(err) {
return false, err
}
if err != nil {
lastErr = err
return false, nil
}

for _, pool := range pools {
p := pool.DeepCopy()
err := isMachineConfigPoolConfigurationValid(p, version.Version.String(), optr.mcLister.Get)
if err != nil {
lastErr = fmt.Errorf("pool %s has not progressed to latest configuration: %v", p.Name, err)
return false, nil
}
pools, err := optr.mcpLister.List(sel)
if err != nil {
return err
}

if p.Generation <= p.Status.ObservedGeneration && p.Status.MachineCount == p.Status.UpdatedMachineCount && p.Status.UnavailableMachineCount == 0 {
continue
}
lastErr = fmt.Errorf("error pool %s is not ready. status: (total: %d, updated: %d, unavailable: %d, degraded: %d)", p.Name, p.Status.MachineCount, p.Status.UpdatedMachineCount, p.Status.UnavailableMachineCount, p.Status.DegradedMachineCount)
return false, nil
for _, pool := range pools {
if err := isMachineConfigPoolConfigurationValid(pool, version.Version.String(), optr.mcLister.Get); err != nil {
return fmt.Errorf("pool %s has not progressed to latest configuration: %v", pool.Name, err)
}
return true, nil
}); err != nil {
if err == wait.ErrWaitTimeout {
return fmt.Errorf("%v during syncRequiredMachineConfigPools: %v", err, lastErr)
if pool.Generation <= pool.Status.ObservedGeneration && pool.Status.MachineCount == pool.Status.UpdatedMachineCount && pool.Status.UnavailableMachineCount == 0 {
continue
}
return err
return fmt.Errorf("error pool %s is not ready. status: (total: %d, updated: %d, unavailable: %d, degraded: %d)", pool.Name, pool.Status.MachineCount, pool.Status.UpdatedMachineCount, pool.Status.UnavailableMachineCount, pool.Status.DegradedMachineCount)
}
return nil
}
Expand Down