[324] | 1 | ## A useful dict with error codes to text |
---|
| 2 | # |
---|
| 3 | # Author: Bas van der Vlies <bas.vandervlies@surfsara.nl> |
---|
| 4 | # |
---|
| 5 | # SVN Info: |
---|
| 6 | # $Id: errors.py 429 2005-11-04 13:59:06Z bas $ |
---|
| 7 | # |
---|
| 8 | errors_txt = { |
---|
| 9 | 0 : 'no error', |
---|
| 10 | 15001 : 'Unknown Job Identifier', |
---|
| 11 | 15002 : 'Undefined Attribute', |
---|
| 12 | 15003 : 'attempt to set READ ONLY attribute', |
---|
| 13 | 15004 : 'Invalid request', |
---|
| 14 | 15005 : 'Unknown batch request', |
---|
| 15 | 15006 : 'Too many submit retries', |
---|
| 16 | 15007 : 'No permission', |
---|
| 17 | 15008 : 'access from host not allowed', |
---|
| 18 | 15009 : 'job already exists', |
---|
| 19 | 15010 : 'system error occurred', |
---|
| 20 | 15011 : 'internal server error occurred', |
---|
| 21 | 15012 : 'parent job of dependent in rte que', |
---|
| 22 | 15013 : 'unknown signal name', |
---|
| 23 | 15014 : 'bad attribute value', |
---|
| 24 | 15015 : 'Cannot modify attrib in run state', |
---|
| 25 | 15016 : 'request invalid for job state', |
---|
| 26 | 15018 : 'Unknown queue name', |
---|
| 27 | 15019 : 'Invalid Credential in request', |
---|
| 28 | 15020 : 'Expired Credential in request', |
---|
| 29 | 15021 : 'Queue not enabled', |
---|
| 30 | 15022 : 'No access permission for queue', |
---|
| 31 | 15023 : 'Bad user - no password entry', |
---|
| 32 | 15024 : 'Max hop count exceeded', |
---|
| 33 | 15025 : 'Queue already exists', |
---|
| 34 | 15026 : 'incompatable queue attribute type', |
---|
| 35 | 15027 : 'Queue Busy (not empty)', |
---|
| 36 | 15028 : 'Queue name too long', |
---|
| 37 | 15029 : 'Feature', |
---|
| 38 | 15030 : 'Cannot enable queue,needs add def', |
---|
| 39 | 15031 : 'Protocol (ASN.1) error', |
---|
| 40 | 15032 : 'Bad attribute list structure', |
---|
| 41 | 15033 : 'No free connections', |
---|
| 42 | 15034 : 'No server to connect to', |
---|
| 43 | 15035 : 'Unknown resource', |
---|
| 44 | 15036 : 'Job exceeds Queue resource limits', |
---|
| 45 | 15037 : 'No Default Queue Defined', |
---|
| 46 | 15038 : 'Job Not Rerunnable', |
---|
| 47 | 15039 : 'Route rejected by all destinations', |
---|
| 48 | 15040 : 'Time in Route Queue Expired', |
---|
| 49 | 15041 : 'Request to MOM failed', |
---|
| 50 | 15042 : '(qsub) cannot access script file', |
---|
| 51 | 15043 : 'Stage In of files failed', |
---|
| 52 | 15044 : 'Resources temporarily unavailable', |
---|
| 53 | 15045 : 'Bad Group specified', |
---|
| 54 | 15046 : 'Max number of jobs in queue', |
---|
| 55 | 15047 : 'Checkpoint Busy, may be retries', |
---|
| 56 | 15048 : 'Limit exceeds allowable', |
---|
| 57 | 15049 : 'Bad Account attribute value', |
---|
| 58 | 15050 : 'Job already in exit state', |
---|
| 59 | 15051 : 'Job files not copied', |
---|
| 60 | 15052 : 'unknown job id after clean init', |
---|
| 61 | 15053 : 'No Master in Sync Set', |
---|
| 62 | 15054 : 'Invalid dependency', |
---|
| 63 | 15055 : 'Duplicate entry in List', |
---|
| 64 | 15056 : 'Bad DIS based Request Protocol', |
---|
| 65 | 15057 : 'cannot execute there', |
---|
| 66 | 15058 : 'sister rejected', |
---|
| 67 | 15059 : 'sister could not communicate', |
---|
| 68 | 15060 : 'req rejected -server shutting down', |
---|
| 69 | 15061 : 'not all tasks could checkpoint', |
---|
| 70 | 15062 : 'Named node is not in the list', |
---|
| 71 | 15063 : 'node-attribute not recognized', |
---|
| 72 | 15064 : 'Server has no node list', |
---|
| 73 | 15065 : 'Node name is too big', |
---|
| 74 | 15066 : 'Node name already exists', |
---|
| 75 | 15067 : 'Bad node-attribute value', |
---|
| 76 | 15068 : 'State values are mutually exclusive', |
---|
| 77 | 15069 : 'Error(s) during global modification of nodes', |
---|
| 78 | 15070 : 'could not contact Mom', |
---|
| 79 | 15071 : 'no time-shared nodes', |
---|
| 80 | 15201 : 'resource unknown', |
---|
| 81 | 15202 : 'parameter could not be used', |
---|
| 82 | 15203 : 'a parameter needed did not exist', |
---|
| 83 | 15204 : "something specified didn't exist", |
---|
| 84 | 15205 : 'a system error occured', |
---|
| 85 | 15206 : 'only part of reservation made' |
---|
| 86 | } |
---|
| 87 | |
---|
| 88 | def error(): |
---|
| 89 | """ |
---|
| 90 | Check if there is an error, if so fetch the error message string. |
---|
| 91 | It says more then a number! |
---|
| 92 | """ |
---|
| 93 | e = get_error() |
---|
| 94 | if errors_txt.has_key(e): |
---|
| 95 | return (e, errors_txt[e]) |
---|
| 96 | else: |
---|
| 97 | return (e, "Could not find a text for this error, uhhh") |
---|