From d8aea71e312343a7f7679c30fa5691f074260898 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Tue, 25 Jul 2017 14:37:25 -0500 Subject: [PATCH] tests: lvm_osds does not have devices defined This means that our tests needs to use the lvm_volumes dictionary instead of devices. Signed-off-by: Andrew Schoen --- tests/conftest.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 0bcc99238..cc3b851a7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -43,7 +43,9 @@ def node(Ansible, Interface, Command, request): address = Interface("eth1").addresses[0] subnet = ".".join(ansible_vars["public_network"].split(".")[0:-1]) num_mons = len(ansible_vars["groups"]["mons"]) - num_devices = len(ansible_vars["devices"]) + num_devices = len(ansible_vars.get("devices", [])) + if not num_devices: + num_devices = len(ansible_vars.get("lvm_volumes", [])) num_osd_hosts = len(ansible_vars["groups"]["osds"]) total_osds = num_devices * num_osd_hosts cluster_name = ansible_vars.get("cluster", "ceph") @@ -58,7 +60,7 @@ def node(Ansible, Interface, Command, request): osd_ids = cmd.stdout.rstrip("\n").split("\n") osds = osd_ids if docker: - osds = [device.split("/")[-1] for device in ansible_vars["devices"]] + osds = [device.split("/")[-1] for device in ansible_vars.get("devices", [])] data = dict( address=address, -- 2.39.5