Merge "Make the decision between primary/handoff sets more obvious"
This commit is contained in:
commit
9d2a1a1d14
@ -101,10 +101,8 @@ class BrainSplitter(object):
|
|||||||
|
|
||||||
self.part, self.nodes = self.ring.get_nodes(self.account, c, o)
|
self.part, self.nodes = self.ring.get_nodes(self.account, c, o)
|
||||||
|
|
||||||
node_ids = [n['id'] for n in self.nodes]
|
self.node_numbers = [n['id'] + 1 for n in self.nodes]
|
||||||
self.node_numbers = [n + 1 for n in node_ids]
|
if 1 in self.node_numbers and 2 in self.node_numbers:
|
||||||
|
|
||||||
if all(n_id in node_ids for n_id in (0, 1)):
|
|
||||||
self.primary_numbers = (1, 2)
|
self.primary_numbers = (1, 2)
|
||||||
self.handoff_numbers = (3, 4)
|
self.handoff_numbers = (3, 4)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user