Oleksii Zhurba | a10927b | 2017-09-27 22:09:23 +0000 | [diff] [blame^] | 1 | from cvp_checks import utils |
| 2 | |
| 3 | |
| 4 | def test_ceph_haproxy(local_salt_client): |
| 5 | config = utils.get_configuration(__file__) |
| 6 | |
| 7 | fail = {} |
| 8 | |
| 9 | for monitor in config["ceph_monitors"]: |
| 10 | monitor_info = local_salt_client.cmd(monitor, 'cmd.run', |
| 11 | ["echo 'show stat' | nc -U " |
| 12 | "/var/run/haproxy/admin.sock | " |
| 13 | "grep ceph_mon_radosgw_cluster"]) |
| 14 | |
| 15 | for name, info in monitor_info.iteritems(): |
| 16 | if "OPEN" and "UP" in info: |
| 17 | continue |
| 18 | else: |
| 19 | fail[name] = info |
| 20 | |
| 21 | assert not fail, "Failed monitors: {}".format(fail) |