From: Vasu Kulkarni Date: Wed, 7 Dec 2016 03:55:10 +0000 (-0800) Subject: limit number of osd's based on roles X-Git-Tag: 1.1.0~479^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dfa037fffaa2c9af09faf06aaeabc535891f99e4;p=teuthology.git limit number of osd's based on roles Signed-off-by: Vasu Kulkarni --- diff --git a/teuthology/task/ceph_ansible.py b/teuthology/task/ceph_ansible.py index 16fd2978d..49cd650a7 100644 --- a/teuthology/task/ceph_ansible.py +++ b/teuthology/task/ceph_ansible.py @@ -145,7 +145,10 @@ class CephAnsible(Task): extra_vars = self.config.get('vars', dict()) host_vars = dict() if not extra_vars.get('osd_auto_discovery', False): - host_vars['devices'] = get_scratch_devices(remote) + roles = self.ctx.cluster.remotes[remote] + dev_needed = len([role for role in roles + if role.startswith('osd')]) + host_vars['devices'] = get_scratch_devices(remote)[0:dev_needed] if 'monitor_interface' not in extra_vars: host_vars['monitor_interface'] = remote.interface if 'public_network' not in extra_vars: