Skip to content

Commit 4f1f095

Browse files
qa/tasks: replace uses of subst_vip with new templating function
Signed-off-by: John Mulligan <[email protected]>
1 parent 7bd85b5 commit 4f1f095

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

qa/tasks/cephadm.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
# these items we use from ceph.py should probably eventually move elsewhere
3232
from tasks.ceph import get_mons, healthy
33-
from tasks.vip import subst_vip
3433

3534
CEPH_ROLE_TYPES = ['mon', 'mgr', 'osd', 'mds', 'rgw', 'prometheus']
3635

@@ -1415,18 +1414,19 @@ def shell(ctx, config):
14151414
roles = teuthology.all_roles(ctx.cluster)
14161415
config = dict((id_, a) for id_ in roles if id_.startswith('host.'))
14171416

1417+
config = _template_transform(ctx, config, config)
14181418
for role, cmd in config.items():
14191419
(remote,) = ctx.cluster.only(role).remotes.keys()
14201420
log.info('Running commands on role %s host %s', role, remote.name)
14211421
if isinstance(cmd, list):
14221422
for c in cmd:
14231423
_shell(ctx, cluster_name, remote,
1424-
['bash', '-c', subst_vip(ctx, c)],
1424+
['bash', '-c', c],
14251425
extra_cephadm_args=args)
14261426
else:
14271427
assert isinstance(cmd, str)
14281428
_shell(ctx, cluster_name, remote,
1429-
['bash', '-ex', '-c', subst_vip(ctx, cmd)],
1429+
['bash', '-ex', '-c', cmd],
14301430
extra_cephadm_args=args)
14311431

14321432

@@ -1452,7 +1452,8 @@ def apply(ctx, config):
14521452
cluster_name = config.get('cluster', 'ceph')
14531453

14541454
specs = config.get('specs', [])
1455-
y = subst_vip(ctx, yaml.dump_all(specs))
1455+
specs = _template_transform(ctx, config, specs)
1456+
y = yaml.dump_all(specs)
14561457

14571458
log.info(f'Applying spec(s):\n{y}')
14581459
_shell(

0 commit comments

Comments
 (0)