Skip to content

Commit

Permalink
fix condition in get_pool_spec_to_update
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Oberlechner <goberlec@redhat.com>
  • Loading branch information
geoberle committed Mar 4, 2024
1 parent c08c9b9 commit 441a316
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions reconcile/ocm_machine_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,17 @@ def get_pool_spec_to_update(
if app-interface does not define a subnet explicitely or if the
subnet is different from OCM, we consider the spec in app-interface oudated.
in such a case this method returns a clone of the current pool definition
In such a case this method returns a clone of the current pool definition
in app-interface with the subnet updated to the one in OCM. if no update
is required, None is returned
how can this happen?
* cluster gets created without specified subnets and ROSA CLI picks the subnet
How can this happen?
* a cluster was created without specified subnets and ROSA CLI picks the subnet
assignment for the nodepools
* nodepools have been recreated on OCM side without app-interface involvement
and the subnet changed
"""
if pool.subnet is None and self.subnet != pool.subnet:
if pool.subnet is None or self.subnet != pool.subnet:
return pool.copy(update={"subnet": self.subnet})
return None

Expand Down

0 comments on commit 441a316

Please sign in to comment.