Skip to content

Commit f1e4902

Browse files
authored
Merge pull request #245 from vignesh-goutham/fix-log-panic
Fix panic on machine controller when considering affinity
2 parents 18b29ef + fd455d0 commit f1e4902

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

controllers/cloudstackmachine_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (r *CloudStackMachineReconciliationRunner) Reconcile() (retRes ctrl.Result,
128128
)
129129
}
130130

131-
// ConsiderAffinity sets machine affinity if needed. It also creates or gets an affinity group CRD if required and
131+
// ConsiderAffinity sets machine affinity if needed. It also creates or gets an affinity group resource if required and
132132
// checks it for readiness.
133133
func (r *CloudStackMachineReconciliationRunner) ConsiderAffinity() (ctrl.Result, error) {
134134
if r.ReconciliationSubject.Spec.Affinity == infrav1.NoAffinity ||
@@ -138,7 +138,7 @@ func (r *CloudStackMachineReconciliationRunner) ConsiderAffinity() (ctrl.Result,
138138

139139
agName, err := utils.GenerateAffinityGroupName(*r.ReconciliationSubject, r.CAPIMachine)
140140
if err != nil {
141-
r.Log.Info("getting affinity group name", err)
141+
return ctrl.Result{}, err
142142
}
143143

144144
// Set failure domain name and owners.

0 commit comments

Comments
 (0)