diff options
| author | Alan Conway <aconway@apache.org> | 2014-08-22 18:06:20 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2014-08-22 18:06:20 +0000 |
| commit | 36997fbed7e1ab87d18c13bc71b9550b64b7512c (patch) | |
| tree | a8bb3d8a3618c4e5a9bb6f253fb516e5133bf4fe /cpp | |
| parent | 36fd9bfff78db4bb8a1dd4187691e87bcafc5007 (diff) | |
| download | qpid-python-36997fbed7e1ab87d18c13bc71b9550b64b7512c.tar.gz | |
QPID-6035: HA clearly distinguish qpid-ha commands intended for cluster manager.
This commit adds a --cluster-manager flag to qpid-ha tool.
Without this flag
- the 'promote' command is not listed in the tool help.
- using the promote command raises an error saying that it is only for cluster manager use
and mentioning the --cluster-manager flag.
With the flag: promote functions as before.
The qpid-ha help text for promote is also more clear now that it is for cluster
manager only.
Originally the idea was to split qpid-ha into two tools but I have kept one tool
with the flag and warning messages because it:
- avoids packaging changes that might trip things up.
- helps people who are already using qpid-ha promote: their scripts will
break but the error message explains how to fix it.
I think the special role of promote is sufficiently clear now even if it is
part of the same tool.
This commit also updates the following to take account of the new flag:
- rgmanager qpidd-primary script.
- qpidd tests.
- qpid book HA chapter.
NOTE: THIS WILL BREAK TEST HARNESSES that do promotion outside of rgmanager.
You'll need to add the --cluster-manager flag in the relevant places.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619877 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rwxr-xr-x | cpp/etc/qpidd-primary.in | 2 | ||||
| -rwxr-xr-x | cpp/src/tests/ha_test.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cpp/etc/qpidd-primary.in b/cpp/etc/qpidd-primary.in index e79d8cc09c..86bc76d5e1 100755 --- a/cpp/etc/qpidd-primary.in +++ b/cpp/etc/qpidd-primary.in @@ -76,7 +76,7 @@ start() { lock $QPID_INIT start primary || return $? echo -n $"Promoting to primary: " - err=$($QPID_HA promote 2>&1) + err=$($QPID_HA promote --cluster-manager 2>&1) RETVAL=$? [ $RETVAL = 0 ] && success || { echo -n "$err: "; failure; } echo diff --git a/cpp/src/tests/ha_test.py b/cpp/src/tests/ha_test.py index f09a4cd573..9adad45ed4 100755 --- a/cpp/src/tests/ha_test.py +++ b/cpp/src/tests/ha_test.py @@ -176,7 +176,7 @@ acl allow all all except Exception, e: raise Exception("Error in qpid_ha -b %s %s: %s"%(url, args,e)) - def promote(self): self.ready(); self.qpid_ha(["promote"]) + def promote(self): self.ready(); self.qpid_ha(["promote", "--cluster-manager"]) def replicate(self, from_broker, queue): self.qpid_ha(["replicate", from_broker, queue]) @property def agent(self): |
