From bf43aa558f8a5705a42fa843391f83fe9e766756 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Sun, 10 Nov 2024 15:06:09 +0100 Subject: [PATCH] Adapt to changes of PR #101 Signed-off-by: Tobias Wolf --- src/rookify/modules/migrate_rgws/main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rookify/modules/migrate_rgws/main.py b/src/rookify/modules/migrate_rgws/main.py index eb92cb3..c6760cb 100644 --- a/src/rookify/modules/migrate_rgws/main.py +++ b/src/rookify/modules/migrate_rgws/main.py @@ -14,7 +14,9 @@ def _get_rgw_daemon_hosts(self) -> List[str]: state_data = self.machine.get_preflight_state("AnalyzeCephHandler").data return self._get_rgw_daemon_hosts_of_map( - state_data["report"]["servicemap"]["services"]["rgw"]["daemons"] + state_data["report"]["servicemap"]["services"] + .get("rgw", {}) + .get("daemons", {}) ) def _get_rgw_daemon_hosts_of_map( @@ -142,7 +144,9 @@ def _migrate_rgw(self, rgw_host: str) -> None: ceph_status = self.ceph.mon_command("status") rgw_daemon_hosts = self._get_rgw_daemon_hosts_of_map( - ceph_status["servicemap"]["services"]["rgw"]["daemons"] + ceph_status["servicemap"]["services"] + .get("rgw", {}) + .get("daemons", {}) ) if rgw_host in rgw_daemon_hosts: