]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: refact test_all_*_osds_are_up_and_in
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 22 Jun 2018 23:43:49 +0000 (01:43 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 11 Jul 2018 12:48:04 +0000 (14:48 +0200)
these tests are skipped on bluestore osds scenarios.
they were going to fail anyway since they are run on mon nodes and
`devices` is defined in inventory for each osd node. It means
`num_devices * num_osd_hosts` returns `0`.
The result is that the test expects to have 0 OSDs up.

The idea here is to move these tests so they are run on OSD nodes.
Each OSD node checks their respective OSD to be UP, if an OSD has 2
devices defined in `devices` variable, it means we are checking for 2
OSD to be up on that node, if each node has all its OSD up, we can say
all OSD are up.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit fe79a5d24086fc61ae84a59bd61a053cddb62941)

tests/functional/tests/osd/test_osds.py

index e87f6e1b017770e94c994b0118a57fd242b3030f..e87c05be5e7165f5658ec4a06af4d3c0ede1f738 100644 (file)
@@ -76,4 +76,4 @@ class TestOSDs(object):
             cluster=node["cluster_name"]
         )
         output = json.loads(host.check_output(cmd))
-        assert node["num_devices"] == self._get_nb_up_osds_from_ids(node, output)
\ No newline at end of file
+        assert node["num_devices"] == self._get_nb_up_osds_from_ids(node, output)