Fix bootstrap_address parameter name during PGA sync

This commit changes the bootstrap address parameter from
"bootstrap-address" to "bootstrap_address" during the subcloud update
call made during the PGA sync operation. This fixes the issue where
the bootstrap_address was not being updated on the peer site, as the
subcloud update API expects the "bootstrap_address" parameter, with
an underscore.

Test Plan:
1. PASS - Create a peer group association and let it do the initial
          sync. Modify the bootstrap-address of the subcloud using
          the subcloud update command and then run the PGA sync
          command. Verify that the rehome_data of the secondary
          subcloud was updated with the new address.

Closes-Bug: 2057973

Change-Id: Ib5786a56c90f771b940e740bc095ebc8168d2830
Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com>
This commit is contained in:
Gustavo Herzmann 2024-03-14 18:37:29 -03:00
parent 23f8df88ec
commit 165dd39c64
1 changed files with 3 additions and 0 deletions

View File

@ -307,6 +307,9 @@ class SystemPeerManager(manager.Manager):
# Sync subcloud information to peer site
peer_subcloud = self.get_peer_subcloud(dc_client, subcloud_name)
if peer_subcloud:
# The subcloud update API expects 'bootstrap_address'
# instead of 'bootstrap-address'
data["bootstrap_address"] = data.pop(consts.BOOTSTRAP_ADDRESS)
dc_peer_subcloud = dc_client.update_subcloud(region_name,
files, data,
is_region_name=True)