Background
In PR #8645 we moved the spot MHC reconciliation before the autoRepair/ReachedIgnitionEndpoint gate in CAPI.Reconcile() to fix a bug where the spot MHC was never created when ignition wasn't reached.
However, the current gate still returns nil from the entire Reconcile function when autoRepair is enabled but ignition hasn't been reached. This means everything after the gate (MachineDeployment reconciliation, etc.) is also skipped.
Proposed Change
Refactor the gate so it only affects regular MHC creation:
- Instead of
return nil when ignition isn't reached, skip only the regular MHC reconciliation
- Allow the rest of
Reconcile() (MachineDeployment, etc.) to proceed normally
Context
Background
In PR #8645 we moved the spot MHC reconciliation before the
autoRepair/ReachedIgnitionEndpointgate inCAPI.Reconcile()to fix a bug where the spot MHC was never created when ignition wasn't reached.However, the current gate still returns
nilfrom the entireReconcilefunction whenautoRepairis enabled but ignition hasn't been reached. This means everything after the gate (MachineDeployment reconciliation, etc.) is also skipped.Proposed Change
Refactor the gate so it only affects regular MHC creation:
return nilwhen ignition isn't reached, skip only the regular MHC reconciliationReconcile()(MachineDeployment, etc.) to proceed normallyContext