From 3a10b54a6aedf64bd16e965c80a6925d96a12277 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 7 Feb 2020 07:33:58 -0600 Subject: [PATCH] qa/tasks/ceph.py: add pre-mgr-commands option for ceph task Signed-off-by: Sage Weil --- qa/tasks/ceph.py | 7 +++++++ 1 file changed, 7 insertions(+) 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: -- 2.39.5