Commit 00addec6 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Clean a bit messages for admin node.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1938 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7aba2e75
...@@ -57,7 +57,7 @@ class AdministrationHandler(MasterHandler): ...@@ -57,7 +57,7 @@ class AdministrationHandler(MasterHandler):
self.app.changeClusterState(state) self.app.changeClusterState(state)
# answer # answer
conn.answer(Errors.Ack('cluster state changed')) conn.answer(Errors.Ack('Cluster state changed'))
if state == ClusterStates.STOPPING: if state == ClusterStates.STOPPING:
self.app.cluster_state = state self.app.cluster_state = state
self.app.shutdown() self.app.shutdown()
...@@ -133,8 +133,7 @@ class AdministrationHandler(MasterHandler): ...@@ -133,8 +133,7 @@ class AdministrationHandler(MasterHandler):
# nothing to do # nothing to do
if not uuid_set: if not uuid_set:
logging.warning('No nodes added') logging.warning('No nodes added')
p = Errors.Ack('no nodes added') conn.answer(Errors.Ack('No nodes added'))
conn.answer(p)
return return
uuids = ', '.join([dump(uuid) for uuid in uuid_set]) uuids = ', '.join([dump(uuid) for uuid in uuid_set])
logging.info('Adding nodes %s' % uuids) logging.info('Adding nodes %s' % uuids)
...@@ -151,5 +150,4 @@ class AdministrationHandler(MasterHandler): ...@@ -151,5 +150,4 @@ class AdministrationHandler(MasterHandler):
node.notify(Packets.StartOperation()) node.notify(Packets.StartOperation())
# broadcast the new partition table # broadcast the new partition table
app.broadcastPartitionChanges(cell_list) app.broadcastPartitionChanges(cell_list)
p = Errors.Ack('node added') conn.answer(Errors.Ack('Nodes added: %s' % (uuids, )))
conn.answer(p)
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