Skip to content

Commit ecaeb87

Browse files
Fix panic with logging
1 parent 1ae418d commit ecaeb87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

controllers/cloudstackmachine_controller.go

Lines changed: 3 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,8 @@ 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+
r.Log.Info("getting affinity group name", err.Error())
142+
return ctrl.Result{}, err
142143
}
143144

144145
// Set failure domain name and owners.

0 commit comments

Comments
 (0)