From: Sébastien Han Date: Fri, 12 Oct 2018 16:58:41 +0000 (+0200) Subject: test: fix docker test for lvm X-Git-Tag: v3.2.0beta6~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa38b86cf83d68e756feb6d016a8c209478c9c5f;p=ceph-ansible.git test: fix docker test for lvm The CI is still running ceph-disk tests upstream. So until https://github.com/ceph/ceph-ansible/pull/3187 is merged nothing will pass anymore. Signed-off-by: Sébastien Han --- diff --git a/tests/functional/tests/osd/test_osds.py b/tests/functional/tests/osd/test_osds.py index feafc219b..851c7d7f5 100644 --- a/tests/functional/tests/osd/test_osds.py +++ b/tests/functional/tests/osd/test_osds.py @@ -71,8 +71,15 @@ class TestOSDs(object): @pytest.mark.docker def test_all_docker_osds_are_up_and_in(self, node, host): - cmd = "sudo docker exec ceph-osd-0 ceph --cluster={cluster} --connect-timeout 5 --keyring /var/lib/ceph/bootstrap-osd/{cluster}.keyring -n client.bootstrap-osd osd tree -f json".format( - hostname=node["vars"]["inventory_hostname"], + osd_scenario = node["vars"].get('osd_scenario', False) + if osd_scenario in ['lvm', 'lvm-batch']: + osd_id = "0" + else: + hostname = node["vars"]["inventory_hostname"] + osd_id = os.path.join(hostname+"-sda") + + cmd = "sudo docker exec ceph-osd-{osd_id} ceph --cluster={cluster} --connect-timeout 5 --keyring /var/lib/ceph/bootstrap-osd/{cluster}.keyring -n client.bootstrap-osd osd tree -f json".format( + osd_id=osd_id, cluster=node["cluster_name"] ) output = json.loads(host.check_output(cmd))