|
|
581d9d |
diff -uNr a/heartbeat/rabbitmq-cluster b/heartbeat/rabbitmq-cluster
|
|
|
581d9d |
--- a/heartbeat/rabbitmq-cluster 2016-06-03 16:17:09.794967156 +0200
|
|
|
581d9d |
+++ b/heartbeat/rabbitmq-cluster 2016-06-03 16:27:29.777803932 +0200
|
|
|
581d9d |
@@ -167,8 +167,13 @@
|
|
|
581d9d |
rmq_delete_nodename
|
|
|
581d9d |
return $OCF_NOT_RUNNING
|
|
|
581d9d |
;;
|
|
|
581d9d |
+ 69)
|
|
|
581d9d |
+ ocf_log info "RabbitMQ server is not running"
|
|
|
581d9d |
+ rmq_delete_nodename
|
|
|
581d9d |
+ return $OCF_NOT_RUNNING
|
|
|
581d9d |
+ ;;
|
|
|
581d9d |
*)
|
|
|
581d9d |
- ocf_log err "Unexpected return code from '$RMQ_CTL cluster status' exit code: $rc"
|
|
|
581d9d |
+ ocf_log err "Unexpected return code from '$RMQ_CTL cluster_status' exit code: $rc"
|
|
|
581d9d |
rmq_delete_nodename
|
|
|
581d9d |
return $OCF_ERR_GENERIC
|
|
|
581d9d |
;;
|
|
|
581d9d |
From 41657b4108211725878b6b46883ff6cc72e44fa9 Mon Sep 17 00:00:00 2001
|
|
|
581d9d |
From: Peter Lemenkov <lemenkov@redhat.com>
|
|
|
581d9d |
Date: Mon, 4 Jul 2016 17:09:16 +0200
|
|
|
581d9d |
Subject: [PATCH] More RabbitMQ POSIX error codes
|
|
|
581d9d |
|
|
|
581d9d |
We must add the following POSIX error codes in order to detect node
|
|
|
581d9d |
failure:
|
|
|
581d9d |
|
|
|
581d9d |
* 68 - EX_NOHOST
|
|
|
581d9d |
* 69 - EX_UNAVAILABLE
|
|
|
581d9d |
* 70 - EX_SOFTWARE
|
|
|
581d9d |
* 75 - EX_TEMPFAIL
|
|
|
581d9d |
* 78 - EX_CONFIG
|
|
|
581d9d |
|
|
|
581d9d |
The following commits introduced these return values:
|
|
|
581d9d |
|
|
|
581d9d |
* rabbitmq/rabbitmq-server@7984540175d0b8852025165b6b6a0ac05d692c98
|
|
|
581d9d |
* rabbitmq/rabbitmq-common@92ae50e5964d4f079c7b2abed1caaa8ab54a439b
|
|
|
581d9d |
|
|
|
581d9d |
For the error codes meanings go to:
|
|
|
581d9d |
|
|
|
581d9d |
* http://www.sbras.ru/cgi-bin/www/unix_help/unix-man?sysexits+3
|
|
|
581d9d |
* http://linux.die.net/include/sysexits.h
|
|
|
581d9d |
* https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=misc/sysexits.h;hb=HEAD
|
|
|
581d9d |
|
|
|
581d9d |
Note that the following error valies do not mean that the node is
|
|
|
581d9d |
stopped and therefore doesn't covered by this commit:
|
|
|
581d9d |
|
|
|
581d9d |
* 64 - EX_USAGE
|
|
|
581d9d |
* 65 - EX_DATAERR
|
|
|
581d9d |
* 67 - EX_NOUSER
|
|
|
581d9d |
|
|
|
581d9d |
Signed-off-by: Peter Lemenkov <lemenkov@redhat.com>
|
|
|
581d9d |
---
|
|
|
581d9d |
heartbeat/rabbitmq-cluster | 7 +------
|
|
|
581d9d |
1 file changed, 1 insertion(+), 6 deletions(-)
|
|
|
581d9d |
|
|
|
581d9d |
diff --git a/heartbeat/rabbitmq-cluster b/heartbeat/rabbitmq-cluster
|
|
|
581d9d |
index b9ae38e..651b837 100755
|
|
|
581d9d |
--- a/heartbeat/rabbitmq-cluster
|
|
|
581d9d |
+++ b/heartbeat/rabbitmq-cluster
|
|
|
581d9d |
@@ -162,12 +162,7 @@ rmq_monitor() {
|
|
|
581d9d |
|
|
|
581d9d |
return $OCF_SUCCESS
|
|
|
581d9d |
;;
|
|
|
581d9d |
- 2)
|
|
|
581d9d |
- ocf_log info "RabbitMQ server is not running"
|
|
|
581d9d |
- rmq_delete_nodename
|
|
|
581d9d |
- return $OCF_NOT_RUNNING
|
|
|
581d9d |
- ;;
|
|
|
581d9d |
- 69)
|
|
|
581d9d |
+ 2|68|69|70|75|78)
|
|
|
581d9d |
ocf_log info "RabbitMQ server is not running"
|
|
|
581d9d |
rmq_delete_nodename
|
|
|
581d9d |
return $OCF_NOT_RUNNING
|