Ejemplo n.º 1
0
 def __init__(self, config, user=None):
     CheckJobsWithProcess.__init__(
         self, config, GridEngineCheckJobsProcessCreator(config))
     self._job_status_key = lmap(
         str.lower,
         config.get_list('job status key',
                         ['JB_jobnum', 'JB_jobnumber', 'JB_job_number'],
                         on_change=None))
Ejemplo n.º 2
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'bjobs', ['-aw']), status_map={
				Job.DONE: ['DONE', 'EXIT', 'UNKWN', 'ZOMBI'],
				Job.QUEUED: ['PEND'],
				Job.RUNNING: ['RUN'],
				Job.WAITING: ['PSUSP', 'USUSP', 'SSUSP', 'WAIT'],
			})
Ejemplo n.º 3
0
	def __init__(self, config, fqid_fun = identity):
		proc_factory = ProcessCreatorAppendArguments(config, 'qstat', ['-f'], lambda wmsIDs: lmap(fqid_fun, wmsIDs))
		CheckJobsWithProcess.__init__(self, config, proc_factory, status_map = {
			'H': Job.SUBMITTED, 'S': Job.SUBMITTED,
			'W': Job.WAITING,   'Q': Job.QUEUED,
			'R': Job.RUNNING,   'C': Job.DONE,
			'E': Job.DONE,      'T': Job.DONE,
			'fail': Job.DONE,   'success': Job.DONE,
		})
Ejemplo n.º 4
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'bjobs', ['-aw']), status_map = {
			'PEND':  Job.QUEUED,  'PSUSP': Job.WAITING,
			'USUSP': Job.WAITING, 'SSUSP': Job.WAITING,
			'RUN':   Job.RUNNING, 'DONE':  Job.DONE,
			'WAIT':  Job.WAITING, 'EXIT':  Job.FAILED,
			'UNKWN': Job.FAILED,  'ZOMBI': Job.FAILED,
		})
Ejemplo n.º 5
0
 def __init__(self, config):
     CheckJobsWithProcess.__init__(
         self, config,
         ProcessCreatorAppendArguments(config, 'job_queue', ['-l']), {
             Job.QUEUED: ['s'],
             Job.RUNNING: ['r'],
             Job.DONE: ['CG'],
             Job.WAITING: ['w']
         })
Ejemplo n.º 6
0
	def _handle_error(self, proc):
		if proc.status(timeout=0):
			stderr = proc.stderr.read_log()
			if 'Failed to fetch ads' in stderr:
				self._status = CheckStatus.ERROR
			if 'Extra Info: You probably saw this error because the condor_schedd is not' in stderr:
				self._log.log_process(proc, msg='condor_q failed:\n' + stderr)
				raise BackendError('condor_schedd is not reachable.')
		CheckJobsWithProcess._handle_error(self, proc)
Ejemplo n.º 7
0
 def _handle_error(self, proc):
     if proc.status(timeout=0):
         stderr = proc.stderr.read_log()
         if 'Failed to fetch ads' in stderr:
             self._status = CheckStatus.ERROR
         if 'Extra Info: You probably saw this error because the condor_schedd is not' in stderr:
             self._log.log_process(proc, msg='condor_q failed:\n' + stderr)
             raise BackendError('condor_schedd is not reachable.')
     CheckJobsWithProcess._handle_error(self, proc)
Ejemplo n.º 8
0
 def __init__(self, config, check_exec):
     proc_factory = GridProcessCreator(config, check_exec, [
         '--verbosity', 1, '--noint', '--logfile', '/dev/stderr', '-i',
         '/dev/stdin'
     ])
     CheckJobsWithProcess.__init__(self,
                                   config,
                                   proc_factory,
                                   status_map=GridWMS.grid_status_map)
Ejemplo n.º 9
0
	def __init__(self, config, fqid_fun=identity):
		proc_factory = ProcessCreatorAppendArguments(config, 'qstat', ['-f'],
			lambda wms_id_list: lmap(fqid_fun, wms_id_list))
		CheckJobsWithProcess.__init__(self, config, proc_factory, status_map={
			Job.DONE: ['C', 'E', 'T', 'fail', 'success'],
			Job.QUEUED: ['Q'],
			Job.RUNNING: ['R'],
			Job.SUBMITTED: ['H', 'S'],
			Job.WAITING: ['W'],
		})
Ejemplo n.º 10
0
	def __init__(self, config):
		proc_factory = ProcessCreatorAppendArguments(config,
			'sacct', ['-n', '-o', 'jobid,partition,state,exitcode', '-j'],
			lambda wms_id_list: [str.join(',', wms_id_list)])
		CheckJobsWithProcess.__init__(self, config, proc_factory, status_map={
			Job.ABORTED: ['CANCELLED+', 'NODE_FAIL', 'CANCELLED', 'FAILED'],
			Job.DONE: ['COMPLETED', 'COMPLETING'],
			Job.RUNNING: ['RUNNING'],
			Job.WAITING: ['PENDING'],
		})
Ejemplo n.º 11
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'condor_q', ['-long']), status_map={
				Job.ABORTED: [3],        # removed
				Job.DONE: [4],           # completed
				Job.FAILED: [6],         # submit error
				Job.READY: [1],          # idle (waiting for a machine to execute on)
				Job.RUNNING: [2],
				Job.WAITING: [0, 5, 7],  # unexpanded (never been run); DISABLED (on hold); suspended
			})
Ejemplo n.º 12
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'condor_q', ['-long']), status_map={
				Job.ABORTED: [3],        # removed
				Job.DONE: [4],           # completed
				Job.FAILED: [6],         # submit error
				Job.READY: [1],          # idle (waiting for a machine to execute on)
				Job.RUNNING: [2],
				Job.WAITING: [0, 5, 7],  # unexpanded (never been run); DISABLED (on hold); suspended
			})
Ejemplo n.º 13
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'condor_q', ['-long']), status_map = {
			0: Job.WAITING,   # unexpanded (never been run)
			1: Job.READY,     # idle (waiting for a machine to execute on)
			2: Job.RUNNING,   # running
			3: Job.ABORTED,   # removed
			4: Job.DONE,      # completed
			5: Job.WAITING,   # DISABLED; on hold
			6: Job.FAILED,    # submit error
			7: Job.WAITING,   # suspended
		})
Ejemplo n.º 14
0
	def __init__(self, config):
		proc_factory = ProcessCreatorAppendArguments(config,
			'sacct', ['-n', '-o', 'jobid,partition,state,exitcode', '-j'], lambda wmsIDs: [str.join(',', wmsIDs)])
		CheckJobsWithProcess.__init__(self, config, proc_factory, status_map = {
			'PENDING': Job.WAITING,    # idle (waiting for a machine to execute on)
			'RUNNING': Job.RUNNING,    # running
			'COMPLETED': Job.DONE,     # running
			'COMPLETING': Job.DONE,    # running
			'CANCELLED+': Job.ABORTED, # removed
			'NODE_FAIL': Job.ABORTED,  # removed
			'CANCELLED': Job.ABORTED,  # removed
			'FAILED': Job.ABORTED,     # submit error
		})
Ejemplo n.º 15
0
 def __init__(self, config, fqid_fun=identity):
     proc_factory = ProcessCreatorAppendArguments(
         config, 'qstat', ['-f'],
         lambda wms_id_list: lmap(fqid_fun, wms_id_list))
     CheckJobsWithProcess.__init__(self,
                                   config,
                                   proc_factory,
                                   status_map={
                                       Job.DONE:
                                       ['C', 'E', 'T', 'fail', 'success'],
                                       Job.QUEUED: ['Q'],
                                       Job.RUNNING: ['R'],
                                       Job.SUBMITTED: ['H', 'S'],
                                       Job.WAITING: ['W'],
                                   })
Ejemplo n.º 16
0
 def __init__(self, config):
     CheckJobsWithProcess.__init__(
         self,
         config,
         ProcessCreatorAppendArguments(config, 'condor_q', ['-long']),
         status_map={
             0: Job.WAITING,  # unexpanded (never been run)
             1: Job.READY,  # idle (waiting for a machine to execute on)
             2: Job.RUNNING,  # running
             3: Job.ABORTED,  # removed
             4: Job.DONE,  # completed
             5: Job.WAITING,  # DISABLED; on hold
             6: Job.FAILED,  # submit error
             7: Job.WAITING,  # suspended
         })
Ejemplo n.º 17
0
	def __init__(self, config):
		proc_factory = ProcessCreatorAppendArguments(config,
			'glite-ce-job-status', ['--level', '0', '--logfile', '/dev/stderr'])
		CheckJobsWithProcess.__init__(self, config, proc_factory, status_map = {
			'ABORTED':        Job.ABORTED,
			'CANCELLED':      Job.ABORTED,
			'DONE-FAILED':    Job.DONE,
			'DONE-OK':        Job.DONE,
			'HELD':           Job.WAITING,
			'IDLE':           Job.QUEUED,
			'PENDING':        Job.WAITING,
			'REALLY-RUNNING': Job.RUNNING,
			'REGISTERED':     Job.QUEUED,
			'RUNNING':        Job.RUNNING,
			'UNKNOWN':        Job.UNKNOWN,
		})
Ejemplo n.º 18
0
 def __init__(self, config):
     CheckJobsWithProcess.__init__(self,
                                   config,
                                   ProcessCreatorAppendArguments(
                                       config, 'arcstat', ['-all']),
                                   status_map={
                                       Job.ABORTED: ['deleted', 'failed'],
                                       Job.CANCELLED: ['killed'],
                                       Job.DONE: ['finished'],
                                       Job.QUEUED: ['accepted', 'queuing'],
                                       Job.READY: ['preparing'],
                                       Job.RUNNING:
                                       ['finishing', 'running'],
                                       Job.SUBMITTED: ['submitting'],
                                       Job.WAITING: ['hold', 'other'],
                                   })
Ejemplo n.º 19
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'arcstat', ['-all']), status_map = {
			'accepted': Job.QUEUED,
			'deleted': Job.ABORTED,
			'failed': Job.ABORTED,
			'finished': Job.DONE,
			'finishing': Job.RUNNING,
			'hold': Job.WAITING,
			'killed': Job.CANCELLED,
			'other': Job.WAITING,
			'preparing': Job.READY,
			'queuing': Job.QUEUED,
			'running': Job.RUNNING,
			'submitting': Job.SUBMITTED,
		})
Ejemplo n.º 20
0
 def __init__(self, config):
     proc_factory = ProcessCreatorAppendArguments(
         config, 'sacct',
         ['-n', '-o', 'jobid,partition,state,exitcode', '-j'],
         lambda wms_id_list: [str.join(',', wms_id_list)])
     CheckJobsWithProcess.__init__(
         self,
         config,
         proc_factory,
         status_map={
             Job.ABORTED:
             ['CANCELLED+', 'NODE_FAIL', 'CANCELLED', 'FAILED'],
             Job.DONE: ['COMPLETED', 'COMPLETING'],
             Job.RUNNING: ['RUNNING'],
             Job.WAITING: ['PENDING'],
         })
Ejemplo n.º 21
0
 def __init__(self, config):
     proc_factory = ProcessCreatorAppendArguments(
         config, 'glite-ce-job-status',
         ['--level', '0', '--logfile', '/dev/stderr'])
     CheckJobsWithProcess.__init__(self,
                                   config,
                                   proc_factory,
                                   status_map={
                                       Job.ABORTED:
                                       ['ABORTED', 'CANCELLED'],
                                       Job.DONE: ['DONE-FAILED', 'DONE-OK'],
                                       Job.QUEUED: ['IDLE', 'REGISTERED'],
                                       Job.RUNNING:
                                       ['REALLY-RUNNING', 'RUNNING'],
                                       Job.UNKNOWN: ['UNKNOWN'],
                                       Job.WAITING: ['HELD', 'PENDING'],
                                   })
Ejemplo n.º 22
0
 def __init__(self, config):
     CheckJobsWithProcess.__init__(self,
                                   config,
                                   ProcessCreatorAppendArguments(
                                       config, 'bjobs', ['-aw']),
                                   status_map={
                                       'PEND': Job.QUEUED,
                                       'PSUSP': Job.WAITING,
                                       'USUSP': Job.WAITING,
                                       'SSUSP': Job.WAITING,
                                       'RUN': Job.RUNNING,
                                       'DONE': Job.DONE,
                                       'WAIT': Job.WAITING,
                                       'EXIT': Job.FAILED,
                                       'UNKWN': Job.FAILED,
                                       'ZOMBI': Job.FAILED,
                                   })
Ejemplo n.º 23
0
 def __init__(self, config, fqid_fun=identity):
     proc_factory = ProcessCreatorAppendArguments(
         config, 'qstat', ['-f'], lambda wmsIDs: lmap(fqid_fun, wmsIDs))
     CheckJobsWithProcess.__init__(self,
                                   config,
                                   proc_factory,
                                   status_map={
                                       'H': Job.SUBMITTED,
                                       'S': Job.SUBMITTED,
                                       'W': Job.WAITING,
                                       'Q': Job.QUEUED,
                                       'R': Job.RUNNING,
                                       'C': Job.DONE,
                                       'E': Job.DONE,
                                       'T': Job.DONE,
                                       'fail': Job.DONE,
                                       'success': Job.DONE,
                                   })
Ejemplo n.º 24
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'ps', ['wwup']))
Ejemplo n.º 25
0
	def __init__(self, config, check_exec):
		proc_factory = GridProcessCreator(config, check_exec,
			['--verbosity', 1, '--noint', '--logfile', '/dev/stderr', '-i', '/dev/stdin'])
		CheckJobsWithProcess.__init__(self, config, proc_factory, status_map=GridWMS.grid_status_map)
Ejemplo n.º 26
0
	def _handleError(self, proc):
		if proc.status(timeout = 0) and ('Failed to fetch ads' in proc.stderr.read_log()):
			self._status = CheckStatus.ERROR
		CheckJobsWithProcess._handleError(self, proc)
Ejemplo n.º 27
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'job_queue', ['-l']),
			{'s': Job.QUEUED, 'r': Job.RUNNING, 'CG': Job.DONE, 'w': Job.WAITING})
Ejemplo n.º 28
0
	def __init__(self, config, user=None):
		CheckJobsWithProcess.__init__(self, config, GridEngineCheckJobsProcessCreator(config))
		self._job_status_key = lmap(str.lower, config.get_list('job status key',
			['JB_jobnum', 'JB_jobnumber', 'JB_job_number'], on_change=None))
Ejemplo n.º 29
0
 def __init__(self, config, user=None):
     CheckJobsWithProcess.__init__(
         self, config, GridEngine_CheckJobsProcessCreator(config))
Ejemplo n.º 30
0
	def __init__(self, config, user = None):
		CheckJobsWithProcess.__init__(self, config, GridEngine_CheckJobsProcessCreator(config))
Ejemplo n.º 31
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'job_queue', ['-l']),
			{Job.QUEUED: ['s'], Job.RUNNING: ['r'], Job.DONE: ['CG'], Job.WAITING: ['w']})
Ejemplo n.º 32
0
 def __init__(self, config):
     CheckJobsWithProcess.__init__(
         self, config,
         ProcessCreatorAppendArguments(config, 'ps', ['wwup']))
Ejemplo n.º 33
0
 def _handleError(self, proc):
     if proc.status(timeout=0) and ('Failed to fetch ads'
                                    in proc.stderr.read_log()):
         self._status = CheckStatus.ERROR
     CheckJobsWithProcess._handleError(self, proc)