mirror of https://github.com/ceph/ceph-ansible.git
tests: update tests for mds to cover multimds case
in case of multimds we must check for the number of mds up instead of just checking if the hostname of the node is in the fsmap. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2512/head
parent
37117071eb
commit
77831ccb7a
|
@ -34,8 +34,7 @@ class TestMDSs(object):
|
||||||
hostname=node["vars"]["inventory_hostname"],
|
hostname=node["vars"]["inventory_hostname"],
|
||||||
cluster=node["cluster_name"]
|
cluster=node["cluster_name"]
|
||||||
)
|
)
|
||||||
|
num_mdss = len(host.ansible.get_variables()["groups"]["mdss"])
|
||||||
output_raw = host.check_output(cmd)
|
output_raw = host.check_output(cmd)
|
||||||
output_json = json.loads(output_raw)
|
output_json = json.loads(output_raw)
|
||||||
active_daemon = output_json["fsmap"]["by_rank"][0]["name"]
|
assert output_json['fsmap']['up'] and output_json['fsmap']['in'] == num_mdss
|
||||||
if active_daemon != hostname:
|
|
||||||
assert output_json['fsmap']['up:standby'] == 1
|
|
Loading…
Reference in New Issue