From: Vasu Kulkarni Date: Sat, 26 May 2018 02:11:33 +0000 (-0700) Subject: osd addition fix in roles and cleanup shipped files X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6bf4266f4783007dac91b7c871ad19dad28c0246;p=teuthology.git osd addition fix in roles and cleanup shipped files Signed-off-by: Vasu Kulkarni --- diff --git a/teuthology/task/ceph_ansible.py b/teuthology/task/ceph_ansible.py index 269885e50c..5002050077 100644 --- a/teuthology/task/ceph_ansible.py +++ b/teuthology/task/ceph_ansible.py @@ -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=[ @@ -536,9 +549,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() @@ -560,6 +572,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 diff --git a/teuthology/task/install/util.py b/teuthology/task/install/util.py index 59547e4422..1c8c5eaf01 100644 --- a/teuthology/task/install/util.py +++ b/teuthology/task/install/util.py @@ -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'),