]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
limit number of osd's based on roles
authorVasu Kulkarni <vasu@redhat.com>
Wed, 7 Dec 2016 03:55:10 +0000 (19:55 -0800)
committerVasu Kulkarni <vasu@redhat.com>
Mon, 19 Dec 2016 18:51:26 +0000 (10:51 -0800)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
teuthology/task/ceph_ansible.py

index 16fd2978d534dc8c9f62d36cc08343b98d5710ab..49cd650a78caf80e72d7417e743e2db0c61b4c97 100644 (file)
@@ -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: