From 0a99f6d6e7b1b6266deaaf8a52e6419ece9249e2 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 15 Apr 2021 14:01:18 -0500 Subject: [PATCH] qa/tasks/cephadm: do subst_vip for cephadm.shell and .apply Signed-off-by: Sage Weil (cherry picked from commit 0d561e2741718498efa319e0c2b5ec3a902c67ca) --- qa/tasks/cephadm.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index b7af10ed49e96..0a76555b868fe 100644 --- a/qa/tasks/cephadm.py +++ b/qa/tasks/cephadm.py @@ -22,6 +22,7 @@ from teuthology.config import config as teuth_config # these items we use from ceph.py should probably eventually move elsewhere from tasks.ceph import get_mons, healthy +from tasks.vip import subst_vip CEPH_ROLE_TYPES = ['mon', 'mgr', 'osd', 'mds', 'rgw', 'prometheus'] @@ -958,12 +959,12 @@ def shell(ctx, config): if isinstance(cmd, list): for c in cmd: _shell(ctx, cluster_name, remote, - ['bash', '-c', c], + ['bash', '-c', subst_vip(ctx, c)], extra_cephadm_args=env) else: assert isinstance(cmd, str) _shell(ctx, cluster_name, remote, - ['bash', '-ex', '-c', cmd], + ['bash', '-ex', '-c', subst_vip(ctx, cmd)], extra_cephadm_args=env) @@ -991,6 +992,8 @@ def apply(ctx, config): specs = config.get('specs', []) y = '\n---\n'.join(map(yaml.dump, specs)) + y = subst_vip(ctx, y) + log.info(f'Applying spec:\n{y}') _shell( ctx, cluster_name, ctx.ceph[cluster_name].bootstrap_remote, -- 2.39.5