mirror of https://github.com/ceph/ceph-ansible.git
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 <aschoen@redhat.com>pull/1716/head
parent
661de0f3b0
commit
d8aea71e31
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue