]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph2: start up mdss
authorSage Weil <sage@redhat.com>
Mon, 11 Nov 2019 23:14:17 +0000 (23:14 +0000)
committerSage Weil <sage@redhat.com>
Thu, 21 Nov 2019 16:46:54 +0000 (10:46 -0600)
TODO: name them properly

Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph2.py

index 32a1b76cf7cbd186e5e17a3a8bc7737dd87a461e..6edf3e5e10aba665f14ffdc5d2737a044ce0d812 100644 (file)
@@ -516,6 +516,41 @@ def ceph_osds(ctx, config):
     finally:
         pass
 
+@contextlib.contextmanager
+def ceph_mdss(ctx, config):
+    """
+    Deploy MDSss
+    """
+    cluster_name = config['cluster']
+    fsid = ctx.ceph[cluster_name].fsid
+    testdir = teuthology.get_testdir(ctx)
+
+    nodes = []
+    for remote, roles in ctx.cluster.remotes.items():
+        for role in [r for r in roles
+                    if teuthology.is_type('mds', cluster_name)(r)]:
+            c_, _, id_ = teuthology.split_role(role)
+            log.info('Adding %s on %s' % (role, remote.shortname))
+            nodes.append(remote.shortname)
+
+            ### FIXME names ###
+            ctx.daemons.register_daemon(
+                remote, 'mds', id_,
+                cluster=cluster_name,
+                fsid=fsid,
+                logger=log.getChild(role),
+                wait=False,
+                started=True,
+            )
+
+    shell(ctx, cluster_name, remote, [
+        'ceph', 'orchestrator', 'mds', 'update',
+        'all',
+        str(len(nodes))] + nodes
+    )
+
+    yield
+
 @contextlib.contextmanager
 def ceph_initial():
     try:
@@ -653,6 +688,7 @@ def task(ctx, config):
             lambda: ceph_mons(ctx=ctx, config=config),
             lambda: ceph_mgrs(ctx=ctx, config=config),
             lambda: ceph_osds(ctx=ctx, config=config),
+            lambda: ceph_mdss(ctx=ctx, config=config),
             lambda: distribute_config_and_admin_keyring(ctx=ctx, config=config),
     ):
         try: