Commit 8cf9f8a9 authored by Giuseppe Lo Presti's avatar Giuseppe Lo Presti
Browse files

Improved logging at the start of diskmanagerd

parent 79ddfb96
......@@ -168,6 +168,8 @@ class DiskServerManagerService(rpyc.Service):
def initQueues():
'''Initializes the queue of pending transfers by rebuilding it from the knowledge of the transfermanagers'''
# 'Initializing queues from schedulers' message
dlf.write(msgs.INITQUEUES)
# we will timeout after 30secs per machine. Note that in this case, we refuse to start
# and thus raise a SystemExit exception.
timeout = 30
......@@ -222,8 +224,6 @@ try:
sys.exit(1)
# setup logging
dlf.init('diskmanagerd')
# 'DiskManager Daemon started'
dlf.write(msgs.DISKMANAGERDSTARTED)
# set umask to execute movers
os.umask(stat.S_IWGRP|stat.S_IWOTH)
# create a list of running Transfers
......@@ -258,6 +258,8 @@ try:
port=configuration.getValue('DiskManager', 'Port', 15011, int),
auto_register=False,
nbThreads=len(configuration.getValue('DiskManager', 'ServerHosts').split())+1)
# 'DiskManager Daemon started'
dlf.write(msgs.DISKMANAGERDSTARTED)
t.daemon = True
t.start()
# we reach this point when the service has stopped
......
......@@ -48,8 +48,8 @@ msgs = dlf.enum('INVOKINGSCHEDULETRANSFER', 'INVOKINGSUMMARIZETRANSFERS',
'SCHEDPRIORITY', 'AVOIDBACKFILLSTARV', 'SCHEDUSERJOB',
'MOVERHANDLEREXCEPTION', 'CLIENTSREPLIEREXCEPTION', 'CLIENTSLISTENEREXCEPTION',
'MOVERSTARTING', 'MOVERSTARTFAILED', 'MOVERCALL',
'TRANSFERTIMEDOUT', 'FAILTOQUERYXROOT'
)
'TRANSFERTIMEDOUT', 'FAILTOQUERYXROOT',
'SYNCRUNNINGTRANSFERS', 'INITQUEUES')
# initialization of the messages
dlf.addmessages({msgs.INVOKINGSCHEDULETRANSFER : 'Invoking scheduleTransfer',
......@@ -106,6 +106,8 @@ dlf.addmessages({msgs.INVOKINGSCHEDULETRANSFER : 'Invoking scheduleTransfer',
msgs.MOVERSTARTFAILED : 'Failed to execute mover',
msgs.MOVERCALL : 'Received call from mover',
msgs.TRANSFERTIMEDOUT : 'Transfer slot timed out',
msgs.FAILTOQUERYXROOT : 'Failed to query xrootd server'
msgs.FAILTOQUERYXROOT : 'Failed to query xrootd server',
msgs.SYNCRUNNINGTRANSFERS : 'Synchronizing running transfers with schedulers',
msgs.INITQUEUES : 'Initializing queues from schedulers'
})
......@@ -116,10 +116,12 @@ class RunningTransfersSet(object):
except Exception, e:
dlf.writeerr(msgs.FAILTOQUERYXROOT, Type=str(e.__class__), Message=str(e))
# send the list of running transfers to the stager DB for synchronization
# 'Synchronizing running transfers with schedulers' message
dlf.write(msgs.SYNCRUNNINGTRANSFERS);
try:
while True:
try:
# send the list of running transfers to the stager DB for synchronization
timeout = self.config.getValue('TransferManager', 'AdminTimeout', 5, float)
connectionpool.connections.syncRunningTransfers(scheduler, socket.getfqdn(),
tuple(leftOvers.keys()), timeout=timeout)
......
Supports Markdown
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