diff options
author | Adam King <adking@redhat.com> | 2024-03-25 18:47:12 +0100 |
---|---|---|
committer | Adam King <adking@redhat.com> | 2024-03-25 18:51:00 +0100 |
commit | 3ba87243edb811033d15dcd95322f0517d701f12 (patch) | |
tree | 5c97ac9069b0897411c1ca2db13fbbebeb78dd0c /src/pybind/mgr/cephadm/services/cephadmservice.py | |
parent | mgr/rgw: add support to modify zonegroup parameters (diff) | |
download | ceph-3ba87243edb811033d15dcd95322f0517d701f12.tar.xz ceph-3ba87243edb811033d15dcd95322f0517d701f12.zip |
mgr/cephadm: update zonegroup w/ zonegroup_hostnames from rgw spec
If users provide this field to the rgw spec, we need to modify
the zonegroup to includes these hostnames. This most just makes
use of another commit that added the `ceph rgw zonegroup modify`
command to the rgw module for this specific purpose.
Signed-off-by: Adam King <adking@redhat.com>
Diffstat (limited to 'src/pybind/mgr/cephadm/services/cephadmservice.py')
-rw-r--r-- | src/pybind/mgr/cephadm/services/cephadmservice.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index d211bbaa309..b786255ee1e 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -965,6 +965,17 @@ class RgwService(CephService): 'val': cert_data, }) + if spec.zonegroup_hostnames: + zg_update_cmd = { + 'prefix': 'rgw zonegroup modify', + 'realm_name': spec.rgw_realm, + 'zonegroup_name': spec.rgw_zonegroup, + 'zone_name': spec.rgw_zone, + 'hostnames': spec.zonegroup_hostnames, + } + logger.debug(f'rgw cmd: {zg_update_cmd}') + ret, out, err = self.mgr.check_mon_command(zg_update_cmd) + # TODO: fail, if we don't have a spec logger.info('Saving service %s spec with placement %s' % ( spec.service_name(), spec.placement.pretty_str())) |