Skip to content

Commit 05c0684

Browse files
authored
Fix tinkerbell machine reconciliation bug (#432)
## Description This change is going to make the reconciler return early when we find that the hardware owned by the tinkerbellmachine is already provisioned. ## Why is this needed When the hardware machine is provisioned there's nothing to reconcile, we missed returning early which caused the machine reconciler to recreate the workflows and this lead to machine getting provisioned again whenever the CAPT and TNK objects moved from one cluster to another. Fixes: # ## How Has This Been Tested? Tested a local build to ensure the machine wasn't reprovisioned after moving from one cluster to another. ## How are existing users impacted? What migration steps/scripts do we need? ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents 2fd8a2b + c6a32f7 commit 05c0684

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

controller/machine/scope.go

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ func (scope *machineReconcileScope) reconcile(hw *tinkv1.Hardware) error {
130130
if v, found := hw.ObjectMeta.GetAnnotations()[HardwareProvisionedAnnotation]; found && v == "true" {
131131
scope.log.Info("Marking TinkerbellMachine as Ready")
132132
scope.tinkerbellMachine.Status.Ready = true
133+
134+
return nil
133135
}
134136

135137
wf, err := scope.ensureTemplateAndWorkflow(hw)

0 commit comments

Comments
 (0)