You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2013/02/25 21:08:05 UTC
svn commit: r1449869 - in /qpid/trunk/qpid: cpp/etc/qpidd-primary.in
cpp/src/qpid/ha/types.cpp tools/src/py/qpid-ha
Author: aconway
Date: Mon Feb 25 20:08:05 2013
New Revision: 1449869
URL: http://svn.apache.org/r1449869
Log:
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...
Modified:
qpid/trunk/qpid/cpp/etc/qpidd-primary.in
qpid/trunk/qpid/cpp/src/qpid/ha/types.cpp
qpid/trunk/qpid/tools/src/py/qpid-ha
Modified: qpid/trunk/qpid/cpp/etc/qpidd-primary.in
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/etc/qpidd-primary.in?rev=1449869&r1=1449868&r2=1449869&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/etc/qpidd-primary.in (original)
+++ qpid/trunk/qpid/cpp/etc/qpidd-primary.in Mon Feb 25 20:08:05 2013
@@ -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"
Modified: qpid/trunk/qpid/cpp/src/qpid/ha/types.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/ha/types.cpp?rev=1449869&r1=1449868&r2=1449869&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/ha/types.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/ha/types.cpp Mon Feb 25 20:08:05 2013
@@ -56,11 +56,6 @@ template <> const char* Enum<ReplicateLe
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"
};
Modified: qpid/trunk/qpid/tools/src/py/qpid-ha
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpid-ha?rev=1449869&r1=1449868&r2=1449869&view=diff
==============================================================================
--- qpid/trunk/qpid/tools/src/py/qpid-ha (original)
+++ qpid/trunk/qpid/tools/src/py/qpid-ha Mon Feb 25 20:08:05 2013
@@ -88,13 +88,8 @@ class StatusCmd(Command):
Command.__init__(self, "status", "Print HA status")
self.op.add_option(
"--expect", type="string", metavar="<status>",
- help="Don't print status. Return 0 if it matches <status>, 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 <status>, 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:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org