diff -uNr a/heartbeat/rabbitmq-cluster b/heartbeat/rabbitmq-cluster --- a/heartbeat/rabbitmq-cluster 2016-02-22 11:09:48.989128414 +0100 +++ b/heartbeat/rabbitmq-cluster 2016-02-22 11:10:12.011835745 +0100 @@ -39,7 +39,14 @@ RMQ_LOG_DIR="/var/log/rabbitmq" NODENAME=$(ocf_local_nodename) +# this attr represents the current active local rmq node name. +# when rmq stops or the node is fenced, this attr disappears RMQ_CRM_ATTR_COOKIE="rmq-node-attr-${OCF_RESOURCE_INSTANCE}" +# this attr represents the last known active local rmq node name +# when rmp stops or the node is fenced, the attr stays forever so +# we can continue to map an offline pcmk node to it's rmq node name +# equivalent. +RMQ_CRM_ATTR_COOKIE_LAST_KNOWN="rmq-node-attr-last-known-${OCF_RESOURCE_INSTANCE}" meta_data() { cat <