transfermanagerdlf.py 9.69 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#/******************************************************************************
# *                   transfermanagerdlf.py
# *
# * This file is part of the Castor project.
# * See http://castor.web.cern.ch/castor
# *
# * Copyright (C) 2003  CERN
# * This program is free software; you can redistribute it and/or
# * modify it under the terms of the GNU General Public License
# * as published by the Free Software Foundation; either version 2
# * of the License, or (at your option) any later version.
# * This program is distributed in the hope that it will be useful,
# * but WITHOUT ANY WARRANTY; without even the implied warranty of
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# * GNU General Public License for more details.
# * You should have received a copy of the GNU General Public License
# * along with this program; if not, write to the Free Software
# * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# *
# *
# * declares all dlf messages used in the CASTOR's transfer manager daemon
# *
# * @author Castor Dev team, castor-dev@cern.ch
# *****************************************************************************/

26
27
'''Declaration of all log messages of the transfer manager daemon'''

28
29
30
31
32
33
34
35
import dlf

# declarations of all messages constants
msgs = dlf.enum('ABORTEREXCEPTION', 'SYNCHROFAILED', 'SYNCHROEXCEPTION',
                'TRANSFERALREADYSTARTED', 'SOURCENOTREADY', 'D2DOVERINFORMFAILED',
                'TRANSFERCANCELEXCEPTION', 'WORKEREXCEPTION', 'FAILEDTRANSFER',
                'FAILINGTRANSFEREXCEPTION', 'TRANSFERSCHEDULED', 'TRANSFERSCHEDULEDEXCEPTION',
                'SCHEDD2DSRC', 'SCHEDD2DDEST', 'SCHEDTRANSFER',
36
37
                'SCHEDD2DSRCFAILED', 'SCHEDD2DDESTFAILED', 'SCHEDTRANSFERFAILED', 'DISPATCHD2DEXCEPTION',
                'DISPATCHJOBEXCEPTION', 'INVOKINGSUMMARIZETRANSFERSPERPOOL', 'INVOKINGSUMMARIZETRANSFERSPERHOST',
Dennis Waldron's avatar
Dennis Waldron committed
38
39
40
                'INVOKINGLISTTRANSFERS', 'INVOKINGKILLTRANSFERS', 'INVOKINGKILLALLTRANSFERS',
                'INVOKINGKILLTRANSFERSINTERNAL', 'INVOKINGKILLALLTRANSFERSINTERNAL',
                'INVOKINGTRANSFERSKILLED', 'INVOKINGTRANSFERSCANCELED', 'INVOKINGTRANSFERSTARTING',
41
42
43
                'INVOKINGTRANSFERENDED', 'INVOKINGGETQUEUEINGTRANSFERS', 'INVOKINGGETRUNNINGD2DSOURCETRANSFERS',
                'INVOKINGD2DENDSRC', 'INVOKINGD2DEND',
                'INVOKINGDRAIN', 'SYNCHROKILLEDTRANSFER', 'FAILTRANSFEREXCEPTION', 'ENDTRANSFEREXCEPTION',
44
                'NOQUEUERETRIEVED', 'SIGNALRECEIVED', 'UNEXPECTEDEXCEPTION',
45
                'COULDNOTCONTACTDS', 'SYNCDBWITHTM', 'SYNCNODISCREPANCY',
46
                'INFODSJOBSTARTED', 'INFODSJOBSTARTEDFAILED', 'DSREFRESHFAILED',
Dennis Waldron's avatar
Dennis Waldron committed
47
                'INVOKINGSYNCRUN', 'SYNCRUNEXCEPTION', 'RUNTRANSFERDISAPPEARED',
48
                'TRANSFERMANAGERDSTARTED', 'TRANSFERMANAGERDSTOPPED', 'NOD2DLEFTBEHIND',
Dennis Waldron's avatar
Dennis Waldron committed
49
                'D2DSYNCFAILED', 'SYNCHROENDEDTRANSFER', 'INVOKINGGETALLRUNNINGD2DSOURCETRANSFERS',
50
                'SYNCDBWITHD2DSRC', 'COULDNOTCONTACTTM', 'TRANSFERSTARTCONFIRMED',
51
                'TRANSFERCANCELEDCONFIRMED',
52
                'D2DENDEXCEPTION', 'D2DDESTRESTARTERROR', 'INVOKINGTRANSFERBACKTOQUEUE',
53
                'TRANSFERSRCCANCELED', 'REPORTMANAGEREXCEPTION', 'INVOKINGMODIFYDISKSERVERS',
54
55
56
                'MODIFYDISKSERVERSEXCEPTION', 'INITQUEUES', 'INITQUEUESENDED',
                'INITQUEUELISTRUNNING', 'INITQUEUELISTPENDING')

57
58
59
60
61
62
63

# initialization of the messages
dlf.addmessages({msgs.ABORTEREXCEPTION : 'Caught exception in Aborter thread',
                 msgs.SYNCHROFAILED : 'Error caught while trying to synchronize DB transfers with scheduler transfers. Giving up for this round.',
                 msgs.SYNCHROEXCEPTION : 'Caught exception in Synchronizer thread',
                 msgs.TRANSFERALREADYSTARTED : 'Transfer had already started. Cancel start',
                 msgs.SOURCENOTREADY : 'Source is not ready yet',
64
                 msgs.D2DOVERINFORMFAILED : 'Failed to inform diskserver that a d2d copy is over',
65
                 msgs.TRANSFERCANCELEXCEPTION : 'Unable to cancel transfer as it\'s not in the transfer list. Probable race condition',
66
67
68
                 msgs.WORKEREXCEPTION : 'Exception caught in Worker thread',
                 msgs.FAILEDTRANSFER : 'Failed transfer',
                 msgs.FAILINGTRANSFEREXCEPTION : 'Exception caught while failing transfer',
69
                 msgs.TRANSFERSCHEDULED : 'Marking transfer as scheduled',
70
71
72
73
                 msgs.TRANSFERSCHEDULEDEXCEPTION : 'Exception caught while marking transfer scheduled',
                 msgs.SCHEDD2DSRC : 'Scheduling d2d source',
                 msgs.SCHEDD2DDEST : 'Scheduling d2d destination',
                 msgs.SCHEDTRANSFER : 'Scheduling standard transfer',
74
75
76
                 msgs.SCHEDD2DSRCFAILED : 'Failed to schedule d2d source',
                 msgs.SCHEDD2DDESTFAILED : 'Failed to schedule d2d destination',
                 msgs.SCHEDTRANSFERFAILED : 'Failed to schedule standard transfer',
77
78
                 msgs.DISPATCHJOBEXCEPTION : 'Exception caught in Dispatcher for regular Job',
                 msgs.DISPATCHD2DEXCEPTION : 'Exception caught in Dispatcher for disk to disk copy',
Dennis Waldron's avatar
Dennis Waldron committed
79
80
81
82
83
84
85
86
87
88
                 msgs.INVOKINGSUMMARIZETRANSFERSPERPOOL : 'Invoking summarizeTransfersPerPool',
                 msgs.INVOKINGSUMMARIZETRANSFERSPERHOST : 'Invoking summarizeTransfersPerHost',
                 msgs.INVOKINGLISTTRANSFERS : 'Invoking listTransfers',
                 msgs.INVOKINGKILLALLTRANSFERS : 'Invoking killalltransfers',
                 msgs.INVOKINGKILLTRANSFERS : 'Invoking killtransfers',
                 msgs.INVOKINGKILLALLTRANSFERSINTERNAL : 'Invoking killalltransfersinternal',
                 msgs.INVOKINGKILLTRANSFERSINTERNAL : 'Invoking killtransfersinternal',
                 msgs.INVOKINGTRANSFERSKILLED : 'Invoking transfersKilled',
                 msgs.INVOKINGTRANSFERSCANCELED : 'Invoking transfersCanceled',
                 msgs.INVOKINGTRANSFERSTARTING : 'Invoking transferStarting',
89
                 msgs.INVOKINGTRANSFERENDED : 'Invoking transferEnded',
Dennis Waldron's avatar
Dennis Waldron committed
90
91
                 msgs.INVOKINGGETQUEUEINGTRANSFERS : 'Invoking getQueueingTransfers',
                 msgs.INVOKINGGETRUNNINGD2DSOURCETRANSFERS : 'Invoking getRunningD2dSourceTransfers',
92
                 msgs.INVOKINGD2DENDSRC : 'Invoking d2dendsrc',
Dennis Waldron's avatar
Dennis Waldron committed
93
94
                 msgs.INVOKINGD2DEND : 'Invoking d2dend',
                 msgs.INVOKINGDRAIN : 'Invoking drain',
95
96
                 msgs.SYNCHROKILLEDTRANSFER : 'Transfer killed by synchronization as it disappeared from the scheduling system',
                 msgs.FAILTRANSFEREXCEPTION : 'Exception caught while failing transfer',
97
                 msgs.ENDTRANSFEREXCEPTION : 'Exception caught while ending transfer',
98
99
100
                 msgs.NOQUEUERETRIEVED : 'No queue could be retrieved',
                 msgs.SIGNALRECEIVED : 'Received signal',
                 msgs.UNEXPECTEDEXCEPTION : 'Caught unexpected exception, exiting',
101
102
                 msgs.COULDNOTCONTACTDS : 'Could not contact diskserver',
                 msgs.SYNCDBWITHTM : 'Synchronizing stager DB with Transfer Manager',
103
104
                 msgs.SYNCNODISCREPANCY : 'No discrepancy during synchronization',
                 msgs.INFODSJOBSTARTED : "Informing diskserver that job started somewhere else",
105
106
                 msgs.INFODSJOBSTARTEDFAILED : "Failed to inform diskserver that job started elsewhere",
                 msgs.DSREFRESHFAILED : 'Failed to refresh list of diskservers, kept old list',
Dennis Waldron's avatar
Dennis Waldron committed
107
                 msgs.INVOKINGSYNCRUN : 'Invoking syncRunningTransfers',
108
                 msgs.SYNCRUNEXCEPTION : 'Exception caught while synchronizing running transfers, giving up with synchronization',
109
110
                 msgs.RUNTRANSFERDISAPPEARED : 'Transfer was marked as failed in stager DB after it disappeared from the diskserver',
                 msgs.TRANSFERMANAGERDSTARTED : 'TransferManager Daemon started',
111
                 msgs.TRANSFERMANAGERDSTOPPED : 'TransferManager Daemon stopped',
112
                 msgs.NOD2DLEFTBEHIND : 'No disk to disk copy source left behind',
113
114
                 msgs.D2DSYNCFAILED : 'Error caught while trying to get rid of disk to disk sources left behind. Giving up for this round.',
                 msgs.SYNCHROENDEDTRANSFER : 'Transfer ended by synchronization as the transfer disappeared from the DB',
Dennis Waldron's avatar
Dennis Waldron committed
115
                 msgs.INVOKINGGETALLRUNNINGD2DSOURCETRANSFERS : 'Invoking getAllRunningD2dSourceTransfers',
116
                 msgs.SYNCDBWITHD2DSRC : 'Synchronizing stager DB with running d2d sources',
117
                 msgs.COULDNOTCONTACTTM : 'Could not contact transfer manager',
118
                 msgs.TRANSFERSTARTCONFIRMED : 'Transfer starting reconfirmed',
119
                 msgs.TRANSFERCANCELEDCONFIRMED : 'Transfer starting just reconfirmed was actually cancelation',
120
                 msgs.D2DENDEXCEPTION : 'Unable to end d2d as it\'s not in the server list. Probable race condition',
121
                 msgs.D2DDESTRESTARTERROR : 'Unable to put d2ddest back in queue as sources are missing. Probable race condition',
122
                 msgs.INVOKINGTRANSFERBACKTOQUEUE : 'Invoking transferBackToQueue',
123
                 msgs.TRANSFERSRCCANCELED : 'denying start of source transfer as it has been canceled',
124
                 msgs.REPORTMANAGEREXCEPTION : 'Caught exception in Reporter thread',
125
                 msgs.INVOKINGMODIFYDISKSERVERS : 'Invoking modifyDiskServers',
126
127
128
129
                 msgs.MODIFYDISKSERVERSEXCEPTION : 'Exception caught while modifying diskserver(s), giving up',
                 msgs.INITQUEUES : 'Initializing Queues from the diskmanagers\' ones',
                 msgs.INITQUEUESENDED : 'Initialization of queues dones',
                 msgs.INITQUEUELISTRUNNING : 'Queue initialization : Getting running jobs',
130
                 msgs.INITQUEUELISTPENDING : 'Queue initialization : Getting pending jobs'})
131