From: Adam King Date: Thu, 27 Jun 2024 21:09:20 +0000 (-0400) Subject: mgr/rgw: fix setting rgw realm token in secondary site rgw spec X-Git-Tag: testing/wip-vshankar-testing-20240718.183435-debug~71^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=95ae364325ddf3acc2ef9bac3e923fe9ca4ef6ba;p=ceph-ci.git mgr/rgw: fix setting rgw realm token in secondary site rgw spec This was setting a field called "rgw_token" in the rgw spec but this is not a real field in rgw specs. Instead we should be setting "rgw_realm_token" which is what the field is actually called. Setting this nonexistent field causes the spec to be deleted the first time cephadm needs to convert it from a json string back into a python object (which happens whenever the module restarts or the active mgr changes) which then causes all the rgw daemons attached to the service to be removed Fixes: https://tracker.ceph.com/issues/66824 Signed-off-by: Adam King --- diff --git a/src/python-common/ceph/rgw/rgwam_core.py b/src/python-common/ceph/rgw/rgwam_core.py index 92e3ce8606e..67101004a26 100644 --- a/src/python-common/ceph/rgw/rgwam_core.py +++ b/src/python-common/ceph/rgw/rgwam_core.py @@ -837,7 +837,7 @@ class RGWAM: realm_token_b = secondary_realm_token.to_json().encode('utf-8') realm_token_s = base64.b64encode(realm_token_b).decode('utf-8') rgw_spec.update_endpoints = True - rgw_spec.rgw_token = realm_token_s + rgw_spec.rgw_realm_token = realm_token_s rgw_spec.rgw_zonegroup = zonegroup.name # master zonegroup is used self.env.mgr.apply_rgw(rgw_spec)