]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
osd addition fix in roles and cleanup shipped files
authorVasu Kulkarni <vasu@redhat.com>
Sat, 26 May 2018 02:11:33 +0000 (19:11 -0700)
committerVasu Kulkarni <vasu@redhat.com>
Thu, 14 Feb 2019 20:28:12 +0000 (12:28 -0800)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
teuthology/task/ceph_ansible.py
teuthology/task/install/util.py

index 276e8f4f91026ddb4eb193aa113c7d59b5138f67..67c17b2ce225aea61589aedfa80ea99ff1b5d091 100644 (file)
@@ -223,6 +223,19 @@ class CephAnsible(Task):
                 run.Raw('~/ceph-ansible/'),
             ]
         )
+        shipped_files = ['/usr/bin/daemon-helper', '/usr/bin/adjust-ulimits']
+        testdir = misc.get_testdir(self.ctx)
+        valgrind_file = os.path.join(testdir, 'valgrind.supp')
+        shipped_files.append(valgrind_file)
+        self.ctx.cluster.run(
+                    args=[
+                        'sudo',
+                        'rm',
+                        '-f',
+                        '--',
+                    ] + list(shipped_files),
+                    check_status=False,
+                )
         if self.config.get('rhbuild'):
             installer_node.run(
                 args=[
@@ -537,9 +550,8 @@ class CephAnsible(Task):
             new_remote_role[remote] = []
             generate_osd_list = True
             for role in roles:
-                _, rol, id = misc.split_role(role)
+                cluster, rol, id = misc.split_role(role)
                 if role.startswith('osd'):
-                    new_remote_role[remote].append(role)
                     if generate_osd_list:
                         # gather osd ids as seen on host
                         out = StringIO()
@@ -561,6 +573,11 @@ class CephAnsible(Task):
                     id = osd_list.pop()
                     log.info("Registering Daemon {rol} {id}".format(rol=rol, id=id))
                     ctx.daemons.add_daemon(remote, rol, id)
+                    if len(role.split('.')) == 2:
+                        osd_role = "{rol}.{id}".format(rol=rol, id=id)
+                    else:
+                        osd_role = "{c}.{rol}.{id}".format(c=cluster, rol=rol, id=id)
+                    new_remote_role[remote].append(osd_role)
                 elif role.startswith('mon') or role.startswith('mgr') or \
                         role.startswith('mds') or role.startswith('rgw'):
                     hostname = remote.shortname
index 59547e44229b6f8339f0873847d54d978a3fe53b..1c8c5eaf01cff6f4eb0d7c31788b9e3d796786b8 100644 (file)
@@ -62,10 +62,11 @@ def ship_utilities(ctx, config):
     :param ctx: Context
     :param config: Configuration
     """
-    log.info(config)
     testdir = teuthology.get_testdir(ctx)
     filenames = []
-
+    if config is None:
+        config = dict()
+    log.info(config)
     log.info('Shipping valgrind.supp...')
     with file(
         os.path.join(os.path.dirname(__file__), 'valgrind.supp'),