]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/cephadm: do subst_vip for cephadm.shell and .apply
authorSage Weil <sage@newdream.net>
Thu, 15 Apr 2021 19:01:18 +0000 (14:01 -0500)
committerSage Weil <sage@newdream.net>
Fri, 16 Apr 2021 14:49:45 +0000 (09:49 -0500)
Signed-off-by: Sage Weil <sage@newdream.net>
qa/tasks/cephadm.py

index b7af10ed49e96308240d3eaa28a64cabd02ddb59..0a76555b868fe795c30fff66a5cc64ab373f32d9 100644 (file)
@@ -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,