Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 3b00615ff64dd24c87ccafa1d70c70f98436e040 1 parent ea5c625
@pavel-paulau pavel-paulau authored
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'])
Please sign in to comment.
Something went wrong with that request. Please try again.