transfermanagerdlf.py 8.67 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
36
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',
                'SCHEDD2DSRCFAILED', 'SCHEDD2DDESTFAILED', 'SCHEDTRANSFERFAILED',
Dennis Waldron's avatar
Dennis Waldron committed
37
38
39
40
41
42
                'DISPATCHEXCEPTION', 'INVOKINGSUMMARIZETRANSFERSPERPOOL', 'INVOKINGSUMMARIZETRANSFERSPERHOST',
                'INVOKINGLISTTRANSFERS', 'INVOKINGKILLTRANSFERS', 'INVOKINGKILLALLTRANSFERS',
                'INVOKINGKILLTRANSFERSINTERNAL', 'INVOKINGKILLALLTRANSFERSINTERNAL',
                'INVOKINGTRANSFERSKILLED', 'INVOKINGTRANSFERSCANCELED', 'INVOKINGTRANSFERSTARTING',
                'INVOKINGGETQUEUEINGTRANSFERS', 'INVOKINGGETRUNNINGD2DSOURCETRANSFERS', 'INVOKINGD2DEND',
                'INVOKINGDRAIN', 'SYNCHROKILLEDTRANSFER', 'FAILTRANSFEREXCEPTION',
43
                'NOQUEUERETRIEVED', 'SIGNALRECEIVED', 'UNEXPECTEDEXCEPTION',
44
                'COULDNOTCONTACTDS', 'SYNCDBWITHTM', 'SYNCNODISCREPANCY',
45
                'INFODSJOBSTARTED', 'INFODSJOBSTARTEDFAILED', 'DSREFRESHFAILED',
Dennis Waldron's avatar
Dennis Waldron committed
46
                'INVOKINGSYNCRUN', 'SYNCRUNEXCEPTION', 'RUNTRANSFERDISAPPEARED',
47
                'TRANSFERMANAGERDSTARTED', 'TRANSFERMANAGERDSTOPPED', 'NOD2DLEFTBEHIND',
Dennis Waldron's avatar
Dennis Waldron committed
48
                'D2DSYNCFAILED', 'SYNCHROENDEDTRANSFER', 'INVOKINGGETALLRUNNINGD2DSOURCETRANSFERS',
49
                'SYNCDBWITHD2DSRC', 'COULDNOTCONTACTTM', 'TRANSFERSTARTCONFIRMED',
50
                'D2DENDEXCEPTION', 'D2DDESTRESTARTERROR', 'INVOKINGTRANSFERBACKTOQUEUE',
51
52
                'TRANSFERSRCCANCELED', 'REPORTMANAGEREXCEPTION', 'INVOKINGMODIFYDISKSERVERS',
                'MODIFYDISKSERVERSEXCEPTION')
53
54
55
56
57
58
59

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