daemon/update: Allow reconcile skip
When we are in runOnce mode AND the previous MachineConfig does
not have a Kind we can assume that there was no previous config
to check against.
@@ -80,6 +80,12 @@ func (dn *Daemon) update(oldConfig, newConfig *mcfgv1.MachineConfig) error {
func (dn *Daemon) reconcilable(oldConfig, newConfig *mcfgv1.MachineConfig) (bool, error) {
glog.Info("Checking if configs are reconcilable")
+ // We skip out of reconcilable if there is no Kind and we are in runOnce mode. The
+ // reason is that there is a good chance a previous state is not available to match against.
+ if oldConfig.Kind == "" && dn.onceFrom != "" {
+ glog.Infof("Missing kind in old config. Assuming reconcilable with new.")
+ return true, nil
+ }
oldIgn := oldConfig.Spec.Config
newIgn := newConfig.Spec.Config
