Skip to content

Commit 8c7c929

Browse files
author
Joshua Reed
committed
Fixup zone by name issue.
1 parent c6e107d commit 8c7c929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/cloudstackmachine_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func (r *CloudStackMachineReconciler) reconcile(
174174
return ctrl.Result{}, errors.Errorf("could not find zone by zoneID: %s", csMachine.Spec.ZoneID)
175175
}
176176
} else if csMachine.Spec.ZoneName != "" {
177-
if zone := csCluster.Status.Zones.GetByName(csMachine.Spec.ZoneID); zone != nil { // ZoneName Specified.
177+
if zone := csCluster.Status.Zones.GetByName(csMachine.Spec.ZoneName); zone != nil { // ZoneName Specified.
178178
csMachine.Status.ZoneID = zone.ID
179179
} else {
180180
return ctrl.Result{}, errors.Errorf("could not find zone by zoneName: %s", csMachine.Spec.ZoneName)

0 commit comments

Comments
 (0)