Commit fa76ea8b authored by Vincent Pelletier's avatar Vincent Pelletier

When logging node manager content, display full node type and full node state.

Also log nodes known by address.
Trigger a node manager log when it gets updated.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1173 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent b58721a3
......@@ -242,6 +242,7 @@ class NodeManager(object):
node.setState(state)
self.add(node)
logging.info('create node %s %s %s %s' % log_args)
self.log()
def log(self):
logging.debug('Node manager : %d nodes' % len(self.node_list))
......@@ -254,7 +255,15 @@ class NodeManager(object):
uuid = '-' * 32
args = (
uuid,
protocol.node_type_prefix_dict[node.getType()],
protocol.node_state_prefix_dict[node.getState()]
node.getType(),
node.getState()
)
logging.debug('nm: %s : %s/%s' % args)
for address, node in sorted(self.server_dict.items()):
args = (
address,
node.getType(),
node.getState()
)
logging.debug('nm: %s : %s/%s' % args)
......@@ -331,13 +331,6 @@ node_types = Enum({
'ADMIN_NODE_TYPE' : 4,
})
node_type_prefix_dict = {
MASTER_NODE_TYPE: 'M',
STORAGE_NODE_TYPE: 'S',
CLIENT_NODE_TYPE: 'C',
ADMIN_NODE_TYPE: 'A',
}
# Node states.
node_states = Enum({
'RUNNING_STATE': 0,
......
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