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>
hostname=node["vars"]["inventory_hostname"],
cluster=node["cluster_name"]
)
+ num_mdss = len(host.ansible.get_variables()["groups"]["mdss"])
output_raw = host.check_output(cmd)
output_json = json.loads(output_raw)
- active_daemon = output_json["fsmap"]["by_rank"][0]["name"]
- if active_daemon != hostname:
- assert output_json['fsmap']['up:standby'] == 1
+ assert output_json['fsmap']['up'] and output_json['fsmap']['in'] == num_mdss
\ No newline at end of file