Commit 57c6a8ab authored by Grégory Wisniewski's avatar Grégory Wisniewski

Admin node answer noError packet to setNoeState request as it's done to it by

the master node, thus when it forward this answer to neoctl, the expected packet
type is always noError.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1224 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 1c315e5e
...@@ -69,7 +69,7 @@ class AdminEventHandler(EventHandler): ...@@ -69,7 +69,7 @@ class AdminEventHandler(EventHandler):
return return
if node.getState() == state and modify_partition_table is False: if node.getState() == state and modify_partition_table is False:
# no change # no change
p = protocol.answerNodeState(node.getUUID(), node.getState()) p = protocol.noError('no change')
conn.answer(p, packet.getId()) conn.answer(p, packet.getId())
return return
# forward to primary master node # forward to primary master node
......
...@@ -91,9 +91,8 @@ class NeoCTL(object): ...@@ -91,9 +91,8 @@ class NeoCTL(object):
update_partition_table = 0 update_partition_table = 0
packet = protocol.setNodeState(node, state, update_partition_table) packet = protocol.setNodeState(node, state, update_partition_table)
response = self.__ask(packet) response = self.__ask(packet)
assert response[0] == protocol.ANSWER_NODE_STATE assert response[0] == protocol.ERROR
assert node == response[1] assert response[1] == protocol.NO_ERROR_CODE
assert state == response[2]
def getClusterState(self): def getClusterState(self):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment