From fc5dbd5b854f351344c476d48245c96390cdf851 Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Thu, 6 Oct 2022 11:08:14 +0200 Subject: [PATCH] Addressing review comments Signed-off-by: Redouane Kachach (cherry picked from commit 7fdb145f1a6de774ee0e40163e93049b707bf2b4) --- doc/cephadm/services/rgw.rst | 4 ++-- doc/mgr/rgw.rst | 11 +++++------ src/python-common/ceph/rgw/rgwam_core.py | 6 ++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/doc/cephadm/services/rgw.rst b/doc/cephadm/services/rgw.rst index be813a0820dc2..e9aee3c6b7fc6 100644 --- a/doc/cephadm/services/rgw.rst +++ b/doc/cephadm/services/rgw.rst @@ -86,8 +86,8 @@ To deploy RGWs serving the multisite *myorg* realm and the *us-east-1* zone on ceph orch apply rgw east --realm=myorg --zonegroup=us-east-zg-1 --zone=us-east-1 --placement="2 myhost1 myhost2" Note that in a multisite situation, cephadm only deploys the daemons. It does not create -or update the realm or zone configurations. To create a new realm and zone, you can use -:ref:`mgr-rgw-module` or manually using something like: +or update the realm or zone configurations. To create a new realms, zones and zonegroups +you can use :ref:`mgr-rgw-module` or manually using something like: .. prompt:: bash # diff --git a/doc/mgr/rgw.rst b/doc/mgr/rgw.rst index f2a6de1161d53..5632fa64f7107 100644 --- a/doc/mgr/rgw.rst +++ b/doc/mgr/rgw.rst @@ -21,8 +21,7 @@ Bootstrapping RGW realm creates a new RGW realm entity, a new zonegroup, and a new zone. It configures a new system user that can be used for multisite sync operations. Under the hood this module instructs the orchestrator to create and deploy the corresponding RGW daemons. The module -supports both passing the arguments in the cmd line as in the form of a spec -file: +supports both passing the arguments through the cmd line or as a spec file: .. prompt:: bash # @@ -48,15 +47,15 @@ Following is an example of RGW mutlisite spec file: spec: rgw_frontend_port: 5500 -.. note:: The spec file used by RGW has the same format as the one used by cephadm. Thus, - the user can provide any cephadm rgw supported parameter as any other advanced - configuration items such as SSL certificates etc. +.. note:: The spec file used by RGW has the same format as the one used by the orchestrator. Thus, + the user can provide any orchestration supported rgw parameters including advanced + configuration features such as SSL certificates etc. Realm Credentials Token ----------------------- -User can list the available tokens for the created (or already existing) realms. +Users can list the available tokens for the created (or already existing) realms. The token is a base64 string that encapsulates the realm information and its master zone endpoint authentication data. Following is an example of the `ceph rgw realm tokens` output: diff --git a/src/python-common/ceph/rgw/rgwam_core.py b/src/python-common/ceph/rgw/rgwam_core.py index af7197ddb8ee2..c9e8f2f94e21d 100644 --- a/src/python-common/ceph/rgw/rgwam_core.py +++ b/src/python-common/ceph/rgw/rgwam_core.py @@ -609,8 +609,7 @@ class RGWAM: def realm_rm_zone_creds(self, realm_token_b64): if not realm_token_b64: - print('missing realm token') - return False + raise RGWAMException('missing realm token') realm_token = RealmToken.from_base64_str(realm_token_b64) try: @@ -744,7 +743,7 @@ class RGWAM: def zonegroup_create(self, realm_token_b64, zonegroup_name=None, endpoints=None, zonegroup_is_master=True): if not realm_token_b64: - print('missing realm access config') + raise RGWAMException('missing realm access config') return False realm_token = RealmToken.from_base64_str(realm_token_b64) @@ -791,7 +790,6 @@ class RGWAM: logging.info(f"Pulled realm {realm_info['name']} ({realm_info['id']})") realm_name = realm_info['name'] realm_id = realm_info['id'] - logging.info(f"Pulled realm {realm_name} ({realm_id})") realm = EntityID(realm_id) period_info = self.period_op().get(realm) -- 2.39.5