transfermanagerdlf.py 9.33 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
                'INVOKINGGETQUEUEINGTRANSFERS', 'INVOKINGGETRUNNINGD2DSOURCETRANSFERS', 'INVOKINGD2DENDSRC',
                'INVOKINGD2DEND',
Dennis Waldron's avatar
Dennis Waldron committed
43
                'INVOKINGDRAIN', 'SYNCHROKILLEDTRANSFER', 'FAILTRANSFEREXCEPTION',
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
                'D2DENDEXCEPTION', 'D2DDESTRESTARTERROR', 'INVOKINGTRANSFERBACKTOQUEUE',
52
                'TRANSFERSRCCANCELED', 'REPORTMANAGEREXCEPTION', 'INVOKINGMODIFYDISKSERVERS',
53
54
55
                'MODIFYDISKSERVERSEXCEPTION', 'INITQUEUES', 'INITQUEUESENDED',
                'INITQUEUELISTRUNNING', 'INITQUEUELISTPENDING')

56
57
58
59
60
61
62

# 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',
63
                 msgs.D2DOVERINFORMFAILED : 'Failed to inform diskserver that a d2d copy is over',
64
                 msgs.TRANSFERCANCELEXCEPTION : 'Unable to cancel transfer as it\'s not in the transfer list. Probable race condition',
65
66
67
                 msgs.WORKEREXCEPTION : 'Exception caught in Worker thread',
                 msgs.FAILEDTRANSFER : 'Failed transfer',
                 msgs.FAILINGTRANSFEREXCEPTION : 'Exception caught while failing transfer',
68
                 msgs.TRANSFERSCHEDULED : 'Marking transfer as scheduled',
69
70
71
72
                 msgs.TRANSFERSCHEDULEDEXCEPTION : 'Exception caught while marking transfer scheduled',
                 msgs.SCHEDD2DSRC : 'Scheduling d2d source',
                 msgs.SCHEDD2DDEST : 'Scheduling d2d destination',
                 msgs.SCHEDTRANSFER : 'Scheduling standard transfer',
73
74
75
                 msgs.SCHEDD2DSRCFAILED : 'Failed to schedule d2d source',
                 msgs.SCHEDD2DDESTFAILED : 'Failed to schedule d2d destination',
                 msgs.SCHEDTRANSFERFAILED : 'Failed to schedule standard transfer',
76
77
                 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
78
79
80
81
82
83
84
85
86
87
88
89
                 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',
                 msgs.INVOKINGGETQUEUEINGTRANSFERS : 'Invoking getQueueingTransfers',
                 msgs.INVOKINGGETRUNNINGD2DSOURCETRANSFERS : 'Invoking getRunningD2dSourceTransfers',
90
                 msgs.INVOKINGD2DENDSRC : 'Invoking d2dendsrc',
Dennis Waldron's avatar
Dennis Waldron committed
91
92
                 msgs.INVOKINGD2DEND : 'Invoking d2dend',
                 msgs.INVOKINGDRAIN : 'Invoking drain',
93
94
95
96
97
                 msgs.SYNCHROKILLEDTRANSFER : 'Transfer killed by synchronization as it disappeared from the scheduling system',
                 msgs.FAILTRANSFEREXCEPTION : 'Exception caught while failing transfer',
                 msgs.NOQUEUERETRIEVED : 'No queue could be retrieved',
                 msgs.SIGNALRECEIVED : 'Received signal',
                 msgs.UNEXPECTEDEXCEPTION : 'Caught unexpected exception, exiting',
98
99
                 msgs.COULDNOTCONTACTDS : 'Could not contact diskserver',
                 msgs.SYNCDBWITHTM : 'Synchronizing stager DB with Transfer Manager',
100
101
                 msgs.SYNCNODISCREPANCY : 'No discrepancy during synchronization',
                 msgs.INFODSJOBSTARTED : "Informing diskserver that job started somewhere else",
102
103
                 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
104
                 msgs.INVOKINGSYNCRUN : 'Invoking syncRunningTransfers',
105
                 msgs.SYNCRUNEXCEPTION : 'Exception caught while synchronizing running transfers, giving up with synchronization',
106
107
                 msgs.RUNTRANSFERDISAPPEARED : 'Transfer was marked as failed in stager DB after it disappeared from the diskserver',
                 msgs.TRANSFERMANAGERDSTARTED : 'TransferManager Daemon started',
108
                 msgs.TRANSFERMANAGERDSTOPPED : 'TransferManager Daemon stopped',
109
                 msgs.NOD2DLEFTBEHIND : 'No disk to disk copy source left behind',
110
111
                 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
112
                 msgs.INVOKINGGETALLRUNNINGD2DSOURCETRANSFERS : 'Invoking getAllRunningD2dSourceTransfers',
113
                 msgs.SYNCDBWITHD2DSRC : 'Synchronizing stager DB with running d2d sources',
114
                 msgs.COULDNOTCONTACTTM : 'Could not contact transfer manager',
115
                 msgs.TRANSFERSTARTCONFIRMED : 'Transfer starting reconfirmed',
116
                 msgs.D2DENDEXCEPTION : 'Unable to end d2d as it\'s not in the server list. Probable race condition',
117
                 msgs.D2DDESTRESTARTERROR : 'Unable to put d2ddest back in queue as sources are missing. Probable race condition',
118
                 msgs.INVOKINGTRANSFERBACKTOQUEUE : 'Invoking transferBackToQueue',
119
                 msgs.TRANSFERSRCCANCELED : 'denying start of source transfer as it has been canceled',
120
121
                 msgs.REPORTMANAGEREXCEPTION : 'Caught exception in Aborter thread',
                 msgs.INVOKINGMODIFYDISKSERVERS : 'Invoking modifyDiskServers',
122
123
124
125
126
                 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',
                 msgs.INITQUEUELISTPENDING : 'Queue initialization : Getting pending jobs'
127
})
128