From 50ac0ec38d5d4e3c2e2ce2dafcccc3ea686ecba0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 30 Sep 2021 10:12:24 -0500 Subject: [PATCH] mgr/rook: describe_services: name rgw svc appropriately Set rgw_zone if present. Do not set rgw_realm because we don't know what it is from the CephObjectstore CRD. Signed-off-by: Sage Weil --- src/pybind/mgr/rook/module.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/rook/module.py b/src/pybind/mgr/rook/module.py index 5a7f177d3a7..cea5ad8ef28 100644 --- a/src/pybind/mgr/rook/module.py +++ b/src/pybind/mgr/rook/module.py @@ -299,9 +299,7 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): # CephObjectstores all_zones = self.rook_cluster.get_resource("cephobjectstores") for zone in all_zones: - rgw_realm = zone['metadata']['name'] - rgw_zone = rgw_realm - svc = 'rgw.' + rgw_realm + svc = 'rgw.' + zone['metadata']['name'] if svc in spec: continue active = zone['spec']['gateway']['instances']; @@ -311,10 +309,10 @@ class RookOrchestrator(MgrModule, orchestrator.Orchestrator): else: ssl = False port = zone['spec']['gateway']['port'] or 80 + rgw_zone = zone['spec'].get('zone', {}).get('name') or None spec[svc] = orchestrator.ServiceDescription( spec=RGWSpec( service_id=zone['metadata']['name'], - rgw_realm=rgw_realm, rgw_zone=rgw_zone, ssl=ssl, rgw_frontend_port=port, -- 2.47.3