From 1bfb0cd84b86e23896a967214a3fa89941addd27 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 5 Mar 2021 16:30:20 -0500 Subject: [PATCH] qa/tasks/cephadm: drop realm.zone convention for rgw Note that cephadm.py will no longer do anything with rgw realms and zones. That means that the setup of rgw roles here is only useful for the default zone and a non-multisite config. Signed-off-by: Sage Weil --- qa/suites/rados/cephadm/smoke/fixed-2.yaml | 2 +- qa/tasks/cephadm.py | 27 +++++----------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/qa/suites/rados/cephadm/smoke/fixed-2.yaml b/qa/suites/rados/cephadm/smoke/fixed-2.yaml index 827d887b6dd35..e93564aa9da7e 100644 --- a/qa/suites/rados/cephadm/smoke/fixed-2.yaml +++ b/qa/suites/rados/cephadm/smoke/fixed-2.yaml @@ -7,7 +7,7 @@ roles: - osd.2 - osd.3 - client.0 - - ceph.rgw.realm.zone.a + - ceph.rgw.foo.a - node-exporter.a - alertmanager.a - - mon.b diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index aa2a8740512d1..3be9a3686ecd5 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -732,30 +732,15 @@ def ceph_rgw(ctx, config): if teuthology.is_type('rgw', cluster_name)(r)]: c_, _, id_ = teuthology.split_role(role) log.info('Adding %s on %s' % (role, remote.shortname)) - realmzone = '.'.join(id_.split('.')[0:2]) - if realmzone not in nodes: - nodes[realmzone] = [] - nodes[realmzone].append(remote.shortname + '=' + id_) + svc = '.'.join(id_.split('.')[0:2]) + if svc not in nodes: + nodes[svc] = [] + nodes[svc].append(remote.shortname + '=' + id_) daemons[role] = (remote, id_) - for realmzone in nodes.keys(): - (realm, zone) = realmzone.split('.', 1) - - # TODO: those should be moved to mgr/cephadm - _shell(ctx, cluster_name, remote, - ['radosgw-admin', 'realm', 'create', '--rgw-realm', realm, '--default'] - ) - _shell(ctx, cluster_name, remote, - ['radosgw-admin', 'zonegroup', 'create', '--rgw-zonegroup=default', '--master', '--default'] - ) - _shell(ctx, cluster_name, remote, - ['radosgw-admin', 'zone', 'create', '--rgw-zonegroup=default', '--rgw-zone', zone, '--master', '--default'] - ) - - for realmzone, nodes in nodes.items(): - (realm, zone) = realmzone.split('.', 1) + for svc, nodes in nodes.items(): _shell(ctx, cluster_name, remote, [ - 'ceph', 'orch', 'apply', 'rgw', realm, zone, + 'ceph', 'orch', 'apply', 'rgw', svc, '--placement', str(len(nodes)) + ';' + ';'.join(nodes)] ) -- 2.39.5