From: Sage Weil Date: Thu, 15 Apr 2021 19:01:18 +0000 (-0500) Subject: qa/tasks/cephadm: do subst_vip for cephadm.shell and .apply X-Git-Tag: v16.2.2~1^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0a99f6d6e7b1b6266deaaf8a52e6419ece9249e2;p=ceph.git qa/tasks/cephadm: do subst_vip for cephadm.shell and .apply Signed-off-by: Sage Weil (cherry picked from commit 0d561e2741718498efa319e0c2b5ec3a902c67ca) --- diff --git a/qa/tasks/cephadm.py b/qa/tasks/cephadm.py index b7af10ed49e..0a76555b868 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,