From 628159f31d5a3da5625529a3e3f9eb16eb95be2b Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Mon, 11 Nov 2024 09:41:07 +0100 Subject: [PATCH] Ensure we are validating current Ceph status data for migration Changes introduced in #86 and updated in #93 only partly considered when data is taken from `analyze_ceph` and when to query Ceph for current status data. This resulted in always assuming RGW daemons got successfully migrated immediately. Signed-off-by: Tobias Wolf --- src/rookify/modules/migrate_rgws/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rookify/modules/migrate_rgws/main.py b/src/rookify/modules/migrate_rgws/main.py index aaa4e25..d80e76c 100644 --- a/src/rookify/modules/migrate_rgws/main.py +++ b/src/rookify/modules/migrate_rgws/main.py @@ -137,7 +137,11 @@ def _migrate_rgw(self, rgw_host: str) -> None: ) while True: - rgw_daemon_hosts = self._get_rgw_daemon_hosts() + ceph_status = self.ceph.mon_command("status") + + rgw_daemon_hosts = self._get_rgw_daemon_hosts_of_map( + ceph_status["servicemap"]["services"]["rgw"]["daemons"] + ) if rgw_host in rgw_daemon_hosts: break