From 242d8406759d1a2c20901c8ca083b7bb732d75d5 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 25 Feb 2013 20:08:05 +0000 Subject: Revert "Bug 891689 - New HA regularly shutting down active node" This reverts commit r1449832, the commit comment did not include a QPID JIRA number. A corrected version of the commit follows... git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1449869 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/etc/qpidd-primary.in | 2 +- qpid/cpp/src/qpid/ha/types.cpp | 5 ----- qpid/tools/src/py/qpid-ha | 7 +------ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/qpid/cpp/etc/qpidd-primary.in b/qpid/cpp/etc/qpidd-primary.in index da0c0c2771..39700bead3 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 --is-primary ; then + if $QPID_HA -b localhost:$QPID_PORT status --expect=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 bb4bf83574..4010ec03a8 100644 --- a/qpid/cpp/src/qpid/ha/types.cpp +++ b/qpid/cpp/src/qpid/ha/types.cpp @@ -56,11 +56,6 @@ template <> const char* Enum::NAMES[] = { "none", "configuration template <> const size_t Enum::N = 3; template <> const char* Enum::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::NAMES[] = { "joining", "catchup", "ready", "recovering", "active", "standalone" }; diff --git a/qpid/tools/src/py/qpid-ha b/qpid/tools/src/py/qpid-ha index 3d56f24fb8..4414623855 100755 --- a/qpid/tools/src/py/qpid-ha +++ b/qpid/tools/src/py/qpid-ha @@ -88,13 +88,8 @@ class StatusCmd(Command): Command.__init__(self, "status", "Print HA status") self.op.add_option( "--expect", type="string", metavar="", - help="Don't print status. Return 0 if it matches , 1 otherwise") - self.op.add_option( - "--is-primary", action="store_true", default=False, - help="Don't print status. Return 0 if the broker is primary, 1 otherwise") + help="Don't print status but return 0 if it matches , 1 otherwise") def do_execute(self, qmf_broker, ha_broker, opts, args): - if opts.is_primary: - if not ha_broker.status in ["active", "recovering"]: raise ExitStatus(1) if opts.expect: if opts.expect != ha_broker.status: raise ExitStatus(1) else: -- cgit v1.2.1