Commit b32e01b3 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove expiration mechanism of temporarily down nodes because it's the admin

node that switch them in down state and notify the administrators.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1130 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 6d9ff4c2
......@@ -578,24 +578,9 @@ class Application(object):
self.finishing_transaction_dict = {}
# Now everything is passive.
expiration = 10
while 1:
t = 0
while True:
try:
em.poll(1)
# implement an expiration of temporary down nodes.
# If a temporary down storage node is expired, it moves to
# down state, and the partition table must drop the node,
# thus repartitioning must be performed.
current_time = time()
if current_time >= t + 1:
t = current_time
for node in nm.getStorageNodeList():
if node.getState() == TEMPORARILY_DOWN_STATE \
and node.getLastStateChange() + expiration < current_time:
logging.warning('%s is down, have to notify the admin' % (node, ))
node.setState(DOWN_STATE)
except OperationFailure:
# If not operational, send Stop Operation packets to storage nodes
# and client nodes. Abort connections to client nodes.
......
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