mirror of
https://github.com/ceph/ceph
synced 2025-02-20 17:37:29 +00:00
Merge PR #33289 into master
* refs/pull/33289/head: qa/tasks/cephadm: deploy rgw daemons too Reviewed-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
commit
b650e75838
@ -1,5 +1,5 @@
|
||||
roles:
|
||||
- [mon.a, mon.c, mgr.y, osd.0, osd.1, osd.2, osd.3, client.0]
|
||||
- [mon.a, mon.c, mgr.y, osd.0, osd.1, osd.2, osd.3, client.0, ceph.rgw.r.z.a]
|
||||
- [mon.b, mgr.x, osd.4, osd.5, osd.6, osd.7, client.1, prometheus.a]
|
||||
openstack:
|
||||
- volumes: # attached to each instance
|
||||
|
@ -676,6 +676,46 @@ def ceph_prometheus(ctx, config):
|
||||
|
||||
yield
|
||||
|
||||
@contextlib.contextmanager
|
||||
def ceph_rgw(ctx, config):
|
||||
"""
|
||||
Deploy rgw
|
||||
"""
|
||||
cluster_name = config['cluster']
|
||||
fsid = ctx.ceph[cluster_name].fsid
|
||||
|
||||
nodes = {}
|
||||
daemons = {}
|
||||
for remote, roles in ctx.cluster.remotes.items():
|
||||
for role in [r for r in roles
|
||||
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_)
|
||||
daemons[role] = (remote, id_)
|
||||
for realmzone, nodes in nodes.items():
|
||||
(realm, zone) = realmzone.split('.', 1)
|
||||
_shell(ctx, cluster_name, remote, [
|
||||
'ceph', 'orch', 'apply', 'rgw',
|
||||
realm, zone,
|
||||
str(len(nodes))] + nodes
|
||||
)
|
||||
for role, i in daemons.items():
|
||||
remote, id_ = i
|
||||
ctx.daemons.register_daemon(
|
||||
remote, 'rgw', id_,
|
||||
cluster=cluster_name,
|
||||
fsid=fsid,
|
||||
logger=log.getChild(role),
|
||||
wait=False,
|
||||
started=True,
|
||||
)
|
||||
|
||||
yield
|
||||
|
||||
@contextlib.contextmanager
|
||||
def ceph_clients(ctx, config):
|
||||
cluster_name = config['cluster']
|
||||
@ -998,6 +1038,7 @@ def task(ctx, config):
|
||||
lambda: ceph_mgrs(ctx=ctx, config=config),
|
||||
lambda: ceph_osds(ctx=ctx, config=config),
|
||||
lambda: ceph_mdss(ctx=ctx, config=config),
|
||||
lambda: ceph_rgw(ctx=ctx, config=config),
|
||||
lambda: ceph_prometheus(ctx=ctx, config=config),
|
||||
lambda: ceph_clients(ctx=ctx, config=config),
|
||||
lambda: distribute_config_and_admin_keyring(ctx=ctx, config=config),
|
||||
|
Loading…
Reference in New Issue
Block a user