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):
return
if node.getState() == state and modify_partition_table is False:
# no change
p = protocol.answerNodeState(node.getUUID(), node.getState())
p = protocol.noError('no change')
conn.answer(p, packet.getId())
return
# forward to primary master node
......
......@@ -91,9 +91,8 @@ class NeoCTL(object):
update_partition_table = 0
packet = protocol.setNodeState(node, state, update_partition_table)
response = self.__ask(packet)
assert response[0] == protocol.ANSWER_NODE_STATE
assert node == response[1]
assert state == response[2]
assert response[0] == protocol.ERROR
assert response[1] == protocol.NO_ERROR_CODE
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