pkg/daemon: set Done if Degraded inDesiredConfig
if we're inDesiredConfig but Degraded it means we failed somehow the
very first actions (i.e. 404 on the rendered MC). But if we're in
Desired config there's no reason NOT to set Done when everything
reconciles back to current == desired.
@@ -921,6 +921,13 @@ func (dn *Daemon) checkStateOnFirstRun() error {
return err
}
}
+ // if we're degraded here, it means we got an error likely on startup and we retried
+ // if it's the case, clear it out
+ if state.state == constants.MachineConfigDaemonStateDegraded {
+ if err := dn.nodeWriter.SetDone(dn.kubeClient.CoreV1().Nodes(), dn.nodeLister, dn.name, state.currentConfig.GetName()); err != nil {
+ return errors.Wrap(err, "error setting node's state to Done")
+ }
+ }
glog.Infof("In desired config %s", state.currentConfig.GetName())
