]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph.py: add pre-mgr-commands option for ceph task
authorSage Weil <sage@redhat.com>
Fri, 7 Feb 2020 13:33:58 +0000 (07:33 -0600)
committerSage Weil <sage@redhat.com>
Wed, 19 Feb 2020 21:31:26 +0000 (15:31 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
qa/tasks/ceph.py

index 00cdd74d0df2f6d9bb01a9be535eb91050d38743..6e479c2bb34e1b2e949095f57d24c089cd7c0fbe 100644 (file)
@@ -1447,6 +1447,13 @@ def run_daemon(ctx, config, type_):
                 role = cluster_name + '.' + type_
                 ctx.daemons.get_daemon(type_, id_, cluster_name).restart()
 
+    # kludge: run any pre-manager commands
+    if type_ == 'mon':
+        for cmd in config.get('pre-mgr-commands', []):
+            firstmon = teuthology.get_first_mon(ctx, config, cluster_name)
+            (remote,) = ctx.cluster.only(firstmon).remotes.keys()
+            remote.run(args=cmd.split(' '))
+
     try:
         yield
     finally: