Skip to content

Commit de2e3e3

Browse files
authored
support vertical resize cluster status updates (#653)
1 parent 5e41f57 commit de2e3e3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

magnum_cluster_api/driver.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,15 @@ def update_nodegroups_status(
541541
]
542542
)
543543

544+
# Ensure that the flavor from the spec matches all of the OpenStackMachine objects
545+
# for this node group (while vertical resizing group)
546+
flavor_match = all(
547+
[
548+
machine.obj["spec"]["flavor"] == md_variables["flavor"]
549+
for machine in machines
550+
]
551+
)
552+
544553
# NOTE(mnaser): If the cluster is in `UPDATE_IN_PROGRESS` state, we need to
545554
# wait for the `MachineDeployment` to match the desired state
546555
# from the `Cluster` resource and that it is in the `Running`
@@ -552,6 +561,7 @@ def update_nodegroups_status(
552561
cluster_resource.get_machine_deployment_spec(node_group.name)
553562
)
554563
and image_id_match
564+
and flavor_match
555565
):
556566
node_group.status = fields.ClusterStatus.UPDATE_COMPLETE
557567
node_group.save()

0 commit comments

Comments
 (0)