diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2019-09-30 23:20:48 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-30 23:20:48 +0300 |
| commit | 20fdd51d9488197691e0a5024bd5b6ee0c77010c (patch) | |
| tree | 167ae478b00559a9adcf09c533ec3ee24b082467 | |
| parent | afe99c9f342a32584d973ebbeaf0245fe9d23ab4 (diff) | |
| parent | 071ff4cc377129b031852e44a64b6e74fa8e4d02 (diff) | |
| download | rabbitmq-server-git-20fdd51d9488197691e0a5024bd5b6ee0c77010c.tar.gz | |
Merge pull request #2127 from luos/fix_healthcheck_partition_result
fix health check returning ok in case of partition
| -rw-r--r-- | src/rabbit_health_check.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/rabbit_health_check.erl b/src/rabbit_health_check.erl index 7a127f9bf6..aa739be33f 100644 --- a/src/rabbit_health_check.erl +++ b/src/rabbit_health_check.erl @@ -62,8 +62,11 @@ node_health_check(list_queues) -> node_health_check(rabbit_node_monitor) -> case rabbit_node_monitor:partitions() of - L when is_list(L) -> - ok + [] -> + ok; + L when is_list(L), length(L) > 0 -> + ErrorMsg = io_lib:format("cluster partition in effect: ~p", [L]), + {error_string, ErrorMsg} end; node_health_check(alarms) -> |
