]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephadm: deploy rgw daemons too 33289/head
authorSage Weil <sage@redhat.com>
Thu, 13 Feb 2020 19:47:23 +0000 (13:47 -0600)
committerSage Weil <sage@redhat.com>
Sat, 15 Feb 2020 01:52:34 +0000 (19:52 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
qa/suites/rados/cephadm/smoke/fixed-2.yaml
qa/tasks/cephadm.py

index ca92a8ff1881008331b6283ff0ff363fd72c921b..b96ba15a06cc1a14f00c73164501193bdeef3f6f 100644 (file)
@@ -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
index 0b19dfeba17e1ec371826ce2453a16f7c4f37f02..ad1bf9c81376557cbfce2d5afec882d329aec2fe 100644 (file)
@@ -675,6 +675,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']
@@ -989,6 +1029,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),