summaryrefslogtreecommitdiff
path: root/qpid/cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-02-25 20:08:15 +0000
committerAlan Conway <aconway@apache.org>2013-02-25 20:08:15 +0000
commitf40d09db7c96b8050cabf4783f067a1cfe1e5c5d (patch)
tree941c7d427848f48ab1eecd428040c0acb037302e /qpid/cpp
parent242d8406759d1a2c20901c8ca083b7bb732d75d5 (diff)
downloadqpid-python-f40d09db7c96b8050cabf4783f067a1cfe1e5c5d.tar.gz
QPID-4600: New HA regularly shutting down active node
qpid-primary script was incorrect and failing on status calls, causing the broker to be restarted by rgmanager. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1449870 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
-rwxr-xr-xqpid/cpp/etc/qpidd-primary.in2
-rw-r--r--qpid/cpp/src/qpid/ha/types.cpp5
2 files changed, 6 insertions, 1 deletions
diff --git a/qpid/cpp/etc/qpidd-primary.in b/qpid/cpp/etc/qpidd-primary.in
index 39700bead3..da0c0c2771 100755
--- a/qpid/cpp/etc/qpidd-primary.in
+++ b/qpid/cpp/etc/qpidd-primary.in
@@ -57,7 +57,7 @@ if [[ !(-x $QPID_HA) ]]; then
fi
status() {
- if $QPID_HA -b localhost:$QPID_PORT status --expect=primary ; then
+ if $QPID_HA -b localhost:$QPID_PORT status --is-primary ; then
echo "qpidd is primary"
else
echo "qpidd is not primary"
diff --git a/qpid/cpp/src/qpid/ha/types.cpp b/qpid/cpp/src/qpid/ha/types.cpp
index 4010ec03a8..bb4bf83574 100644
--- a/qpid/cpp/src/qpid/ha/types.cpp
+++ b/qpid/cpp/src/qpid/ha/types.cpp
@@ -56,6 +56,11 @@ template <> const char* Enum<ReplicateLevel>::NAMES[] = { "none", "configuration
template <> const size_t Enum<ReplicateLevel>::N = 3;
template <> const char* Enum<BrokerStatus>::NAME = "HA broker status";
+
+// NOTE: Changing status names will have an impact on qpid-ha and
+// the qpidd-primary init script.
+// Don't change them unless you are going to update all dependent code.
+//
template <> const char* Enum<BrokerStatus>::NAMES[] = {
"joining", "catchup", "ready", "recovering", "active", "standalone"
};