From 64febc50fb0e41fb93445bfbd643c7aa9b2515c1 Mon Sep 17 00:00:00 2001 From: Gustavo Herzmann Date: Thu, 9 Nov 2023 18:22:28 -0300 Subject: [PATCH] Fix endpoint status update for secondary and rehome-pending subclouds The `update_subcloud_endpoint_status_sync` call, when setting the deploy status of a subcloud to 'secondary' or 'rehome-pending,' is missing the `subcloud_region` parameter. This omission causes the endpoints of ALL subclouds to be set to 'unknown.' The `subcloud_name` parameter alone is insufficient, as it is only used internally in a log message. This commit addresses the issue by adding the missing `subcloud_region` parameter. Test Plan: 1. PASS - On a system with 2 or more subclouds, update the subcloud deploy status to 'secondary' or 'rehome-pending' and verify that only the targeted subcloud has its endpoint statuses set to 'unknown.' All other subclouds must remain unaffected. Related commits: https://review.opendev.org/c/starlingx/distcloud/+/890176 https://review.opendev.org/c/starlingx/distcloud/+/900288 Story: 2010852 Task: 49059 Signed-off-by: Gustavo Herzmann Change-Id: I262bbb70934adb40c9fe9243950bca55039a3ec9 --- distributedcloud/dcmanager/manager/subcloud_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/distributedcloud/dcmanager/manager/subcloud_manager.py b/distributedcloud/dcmanager/manager/subcloud_manager.py index b542a1e31..d6d9b476e 100644 --- a/distributedcloud/dcmanager/manager/subcloud_manager.py +++ b/distributedcloud/dcmanager/manager/subcloud_manager.py @@ -2857,6 +2857,7 @@ class SubcloudManager(manager.Manager): self.state_rpc_client.update_subcloud_endpoint_status_sync( context, subcloud_name=subcloud.name, + subcloud_region=subcloud.region_name, endpoint_type=None, sync_status=dccommon_consts.SYNC_STATUS_UNKNOWN)