예제 #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))
예제 #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'],
			})
예제 #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,
		})
예제 #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,
		})
예제 #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']
         })
예제 #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)
예제 #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)
예제 #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)
예제 #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'],
		})
예제 #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'],
		})
예제 #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
			})
예제 #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
			})
예제 #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
		})
예제 #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
		})
예제 #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'],
                                   })
예제 #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
         })
예제 #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,
		})
예제 #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'],
                                   })
예제 #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,
		})
예제 #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'],
         })
예제 #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'],
                                   })
예제 #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,
                                   })
예제 #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,
                                   })
예제 #24
0
	def __init__(self, config):
		CheckJobsWithProcess.__init__(self, config,
			ProcessCreatorAppendArguments(config, 'ps', ['wwup']))
예제 #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)
예제 #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)
예제 #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})
예제 #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))
예제 #29
0
 def __init__(self, config, user=None):
     CheckJobsWithProcess.__init__(
         self, config, GridEngine_CheckJobsProcessCreator(config))
예제 #30
0
	def __init__(self, config, user = None):
		CheckJobsWithProcess.__init__(self, config, GridEngine_CheckJobsProcessCreator(config))
예제 #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']})
예제 #32
0
 def __init__(self, config):
     CheckJobsWithProcess.__init__(
         self, config,
         ProcessCreatorAppendArguments(config, 'ps', ['wwup']))
예제 #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)