From: Sage Weil Date: Fri, 7 Feb 2020 13:33:58 +0000 (-0600) Subject: qa/tasks/ceph.py: add pre-mgr-commands option for ceph task X-Git-Tag: v15.1.1~304^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3a10b54a6aedf64bd16e965c80a6925d96a12277;p=ceph.git qa/tasks/ceph.py: add pre-mgr-commands option for ceph task Signed-off-by: Sage Weil --- diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 00cdd74d0df..6e479c2bb34 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -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: