Skip to content
Browse files

MB-5945: raise exception if trying to failover inactive node

Change-Id: I3cb1a4540fb1f6238b17f5b37e3d59fe355c1291
Reviewed-on: http://review.couchbase.org/19545
Reviewed-by: Bin Cui <bin.cui@gmail.com>
Tested-by: Pavel Paulau <pavel.paulau@gmail.com>
  • Loading branch information...
1 parent ea5c625 commit 3b00615ff64dd24c87ccafa1d70c70f98436e040 @pavel-paulau pavel-paulau committed Aug 13, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 node.py
View
5 node.py
@@ -341,7 +341,10 @@ def getNodeOtps(self, to_eject=[], to_failover=[], to_readd=[]):
if node['hostname'] in to_eject:
eject_otps.append(node['otpNode'])
if node['hostname'] in to_failover:
- failover_otps.append(node['otpNode'])
+ if node['clusterMembership'] != 'active':
+ raise Exception('node %s is not active' % node['hostname'])
+ else:
+ failover_otps.append(node['otpNode'])
if node['hostname'] in to_readd:
readd_otps.append(node['otpNode'])

0 comments on commit 3b00615

Please sign in to comment.
Something went wrong with that request. Please try again.