htcondor – HTCondor Reference¶
This page is an exhaustive reference of the API exposed by the htcondor
module. It is not meant to be a tutorial for new users but rather a helpful
guide for those who already understand the basic usage of the module.
This reference covers the following:
- Common Module-Level Functions and Objects: The more commonly-used
htcondorfunctions. Schedd: Interacting with thecondor_schedd.Collector: Interacting with thecondor_collector.Submit: Submitting to HTCondor.Claim: Working with HTCondor claims._Param: Working with the parameter objects.JobEventLog: Working with user event logs.JobEvent: An event in a user event log.- Esoteric Module-Level Functions: Less-commonly used
htcondorfunctions. - Useful Enumerations: Useful enumerations.
Common Module-Level Functions and Objects¶
-
htcondor.platform()¶ Returns the platform of HTCondor this module is running on.
-
htcondor.version()¶ Returns the version of HTCondor this module is linked against.
-
htcondor.reload_config()¶ Reload the HTCondor configuration from disk.
-
htcondor.enable_debug()¶ Enable debugging output from HTCondor; output is sent to
stderr. The logging level is controlled by the HTCondor configuration variableTOOL_DEBUG.
-
htcondor.enable_log()¶ Enable debugging output from HTCondor; output is sent to a file.
The log level and the file used are controlled by the HTCondor configuration variables
TOOL_DEBUGandTOOL_LOG, respectively.
-
htcondor.read_events(file_obj, is_xml = True)¶ Read and parse an HTCondor event log file.
Parameters: - file_obj – A file object corresponding to an HTCondor event log.
- is_xml (bool) – Specifies whether the event log is XML-formatted.
Returns: A Python iterator which produces objects of type
ClassAd.Return type: EventIterator
-
htcondor.poll(active_queries)¶ Wait on the results of multiple query iteratories.
This function returns an iterator which yields the next ready query iterator. The returned iterator stops when all results have been consumed for all iterators.
Parameters: active_queries (list[ QueryIterator]) – Query iterators as returned by xquery().Returns: An iterator producing the ready QueryIterator.Return type: BulkQueryIterator
Module Classes¶
-
class
htcondor.Schedd¶ Client object for a remote
condor_schedd.-
__init__(location_ad=None)¶ Create an instance of the
Scheddclass.Parameters: location_ad ( ClassAd) – describes the location of the remotecondor_schedddaemon, as returned by theCollector.locate()method. If the parameter is omitted, the localcondor_schedddaemon is used.
-
transaction(flags=0, continue_txn=False)¶ Start a transaction with the
condor_schedd.Starting a new transaction while one is ongoing is an error unless the
continue_txnflag is set.Parameters: - flags (
TransactionFlags) – Flags controlling the behavior of the transaction, defaulting to 0. - continue_txn (bool) – Set to
Trueif you would like this transaction to extend any pre-existing transaction; defaults toFalse. If this is not set, starting a transaction inside a pre-existing transaction will cause an exception to be thrown.
Returns: A transaction context manager object.
- flags (
-
query(constraint='true', attr_list=[], callback=None, limit=-1, opts=QueryOpts.Default)¶ Query the
condor_schedddaemon for jobs.Note
This returns a list of
ClassAdobjects, meaning all results must be buffered in memory. This may be memory-intensive for large responses; we strongly recommend to utilize thexquery()Parameters: - constraint (str or
ExprTree) – Query constraint; only jobs matching this constraint will be returned; defaults to'true'. - attr_list (list[str]) – Attributes for the
condor_schedddaemon to project along. At least the attributes in this list will be returned. The default behavior is to return all attributes. - callback – A callable object; if provided, it will be invoked for each ClassAd.
The return value (if note
None) will be added to the returned list instead of the ad. - limit (int) – The maximum number of ads to return; the default (
-1) is to return all ads. - opts (
QueryOpts.) – Additional flags for the query; these may affect the behavior of thecondor_schedd.
Returns: ClassAds representing the matching jobs.
Return type: list[
ClassAd]- constraint (str or
-
xquery(requirements='true', projection=[], limit=-1, opts=QueryOpts.Default, name=None)¶ Query the condor_schedd daemon for jobs.
As opposed to
query(), this returns an iterator, meaning only one ad is buffered in memory at a time.Parameters: - requirements (str or
ExprTree) – provides a constraint for filtering out jobs. It defaults to'true'. - projection (list[str]) – The attributes to return; an empty list (the default) signifies all attributes.
- limit (int) – A limit on the number of matches to return. The default (
-1) indicates all matching jobs should be returned. - opts (
QueryOpts) – Additional flags for the query, fromQueryOpts. - name (str) – A tag name for the returned query iterator. This string will always be
returned from the
QueryIterator.tag()method of the returned iterator. The default value is thecondor_schedd’s name. This tag is useful to identify different queries when using thepoll()function.
Returns: An iterator for the matching job ads
Return type: - requirements (str or
-
act(action, job_spec)¶ Change status of job(s) in the
condor_schedddaemon. The return value is a ClassAd object describing the number of jobs changed.This will throw an exception if no jobs are matched by the constraint.
Parameters:
-
edit(job_spec, attr, value)¶ Edit one or more jobs in the queue.
This will throw an exception if no jobs are matched by the
job_specconstraint.Parameters: - job_spec (list[str] or str) – The job specification. It can either be a list of job IDs or a string specifying a constraint. Only jobs matching this description will be acted upon.
- attr (str) – The name of the attribute to edit.
- value (str or
ExprTree) – The new value of the attribute. It should be a string, which will be converted to a ClassAd expression, or an ExprTree object. Be mindful of quoting issues; to set the value to the stringfoo, one would set the value to'"foo"'
-
history(requirements, projection, match=1)¶ Fetch history records from the
condor_schedddaemon.Parameters: - requirements – Query constraint; only jobs matching this constraint will be returned;
defaults to
'true'. - projection (list[str]) – Attributes that are to be included for each returned job. The empty list causes all attributes to be included.
- match (int) – An limit on the number of jobs to include; the default (
-1) indicates to return all matching jobs.
Returns: All matching ads in the Schedd history, with attributes according to the
projectionkeyword.Return type: - requirements – Query constraint; only jobs matching this constraint will be returned;
defaults to
-
submit(ad, count = 1, spool = false, ad_results = None)¶ Submit one or more jobs to the
condor_schedddaemon.This method requires the invoker to provide a ClassAd for the new job cluster; such a ClassAd contains attributes with different names than the commands in a submit description file. As an example, the stdout file is referred to as
outputin the submit description file, butOutin the ClassAd.Hint
To generate an example ClassAd, take a sample submit description file and invoke:
condor_submit -dump <filename> [cmdfile]
Then, load the resulting contents of
<filename>into Python.Parameters: - ad (
ClassAd) – The ClassAd describing the job cluster. - count (int) – The number of jobs to submit to the job cluster. Defaults to
1. - spool (bool) – If
True, the clinent inserts the necessary attributes into the job for it to have the input files spooled to a remotecondor_schedddaemon. This parameter is necessary for jobs submitted to a remotecondor_scheddthat use HTCondor file transfer. - ad_results (list[
ClassAd]) – If set to a list, the list object will contain the job ads resulting from the job submission. These are needed for interacting with the job spool after submission.
Returns: The newly created cluster ID.
Return type: - ad (
-
submitMany(cluster_ad, proc_ads, spool = false, ad_results = None)¶ Submit multiple jobs to the
condor_schedddaemon, possibly including several distinct processes.Parameters: - cluster_ad (
ClassAd) – The base ad for the new job cluster; this is the same format as in thesubmit()method. - proc_ads (list) – A list of 2-tuples; each tuple has the format of
(proc_ad, count). For each list entry, this will result in count jobs being submitted inheriting from bothcluster_adandproc_ad. - spool (bool) – If
True, the clinent inserts the necessary attributes into the job for it to have the input files spooled to a remotecondor_schedddaemon. This parameter is necessary for jobs submitted to a remotecondor_scheddthat use HTCondor file transfer. - ad_results (list[
ClassAd]) – If set to a list, the list object will contain the job ads resulting from the job submission. These are needed for interacting with the job spool after submission.
Returns: The newly created cluster ID.
Return type: - cluster_ad (
-
spool(ad_list)¶ Spools the files specified in a list of job ClassAds to the
condor_schedd.Parameters: ad_list (list[ ClassAds]) – A list of job descriptions; typically, this is the list filled by thead_resultsargument of thesubmit()method call.Raises: RuntimeError – if there are any errors.
-
retrieve(job_spec)¶ Retrieve the output sandbox from one or more jobs.
Parameters: job_spec (list[ ClassAd]) – An expression matching the list of job output sandboxes to retrieve.
-
refreshGSIProxy(cluster, proc, filename, lifetime)¶ Refresh the GSI proxy of a job; the job’s proxy will be replaced the contents of the provided
filename.Note
Depending on the lifetime of the proxy in filename, the resulting lifetime may be shorter than the desired lifetime.
Parameters: - cluster (int) – Cluster ID of the job to alter.
- proc (int) – Process ID of the job to alter.
- lifetime (int) – Indicates the desired lifetime (in seconds) of the delegated proxy.
A value of
0specifies to not shorten the proxy lifetime. A value of-1specifies to use the value of configuration variableDELEGATE_JOB_GSI_CREDENTIALS_LIFETIME.
-
negotiate((str)accounting_name)¶ Begin a negotiation cycle with the remote schedd for a given user.
Note
The returned
ScheddNegotiateadditionally serves as a context manager, automatically destroying the negotiation session when the context is left.Parameters: accounting_name (str) – Determines which user the client will start negotiating with. Returns: An iterator which yields resource request ClassAds from the condor_schedd. Each resource request represents a set of jobs that are next in queue for the schedd for this user.Return type: ScheddNegotiate
-
reschedule()¶ Send reschedule command to the schedd.
-
-
class
htcondor.Collector¶ Client object for a remote
condor_collector. The interaction with the collector broadly has three aspects:- Locating a daemon.
- Query the collector for one or more specific ClassAds.
- Advertise a new ad to the
condor_collector.
-
__init__(pool = None)¶ Create an instance of the
Collectorclass.Parameters: pool (str or list[str]) – A host:portpair specified for the remote collector (or a list of pairs for HA setups). If omitted, the value of configuration parameterCOLLECTOR_HOSTis used.
-
locate(daemon_type, name)¶ Query the
condor_collectorfor a particular daemon.Parameters: - daemon_type (
DaemonTypes) – The type of daemon to locate. - name (str) – The name of daemon to locate. If not specified, it searches for the local daemon.
Returns: a minimal ClassAd of the requested daemon, sufficient only to contact the daemon; typically, this limits to the
MyAddressattribute.Return type: - daemon_type (
-
locateAll(daemon_type)¶ Query the condor_collector daemon for all ClassAds of a particular type. Returns a list of matching ClassAds.
Parameters: daemon_type ( DaemonTypes) – The type of daemon to locate.Returns: Matching ClassAds Return type: list[ ClassAd]
-
query(ad_type, constraint='true', attrs=[], statistics='')¶ Query the contents of a condor_collector daemon. Returns a list of ClassAds that match the constraint parameter.
Parameters: - ad_type (
AdTypes) – The type of ClassAd to return. If not specified, the type will be ANY_AD. - constraint (str or
ExprTree) – A constraint for the collector query; only ads matching this constraint are returned. If not specified, all matching ads of the given type are returned. - attrs (list[str]) – A list of attributes to use for the projection. Only these attributes, plus a few server-managed,
are returned in each
ClassAd. - statistics (list[str]) – Statistics attributes to include, if they exist for the specified daemon.
Returns: A list of matching ads.
Return type: list[
ClassAd]- ad_type (
-
advertise(ad_list, command="UPDATE_AD_GENERIC", use_tcp=True)¶ Advertise a list of ClassAds into the condor_collector.
Parameters: - ad_list (list[
ClassAds]) –ClassAdsto advertise. - command (str) – An advertise command for the remote
condor_collector. It defaults toUPDATE_AD_GENERIC. Other commands, such asUPDATE_STARTD_AD, may require different authorization levels with the remote daemon. - use_tcp (bool) – When set to true, updates are sent via TCP. Defaults to
True.
- ad_list (list[
-
class
htcondor.Submit¶ An object representing a job submit description. This uses the same submit language as
condor_submit.The submit description contains
key = valuepairs and implements the python dictionary protocol, including theget,setdefault,update,keys,items, andvaluesmethods.-
__init__(input = None)¶ Create an instance of the Submit class.
Parameters: input (dict) – Key = valuepairs for initializing the submit description. If omitted, the submit class is initially empty.
-
expand(attr)¶ Expand all macros for the given attribute.
Parameters: attr (str) – The name of the relevant attribute. Returns: The value of the given attribute; all macros are expanded. Return type: str
-
queue((object)txn, (int)count = 1, (object)ad_results = None)¶ Submit the current object to a remote queue.
Parameters: - txn (
Transaction) – An active transaction object (seeSchedd.transaction()). - count (int) – The number of jobs to create (defaults to
1). - ad_results – A list to receive the ClassAd resulting from this submit.
As with
Schedd.submit(), this is often used to later spool the input files.
Returns: The ClusterID of the submitted job(s).
Return type: Raises: RuntimeError – if the submission fails.
- txn (
-
-
class
htcondor.Negotiator¶ This class provides a query interface to the
condor_negotiator; primarily, it allows one to query and set various parameters in the fair-share accounting.-
__init__(ad = None)¶ Create an instance of the Negotiator class.
Parameters: ad ( ClassAd) – A ClassAd describing the claim and thecondor_negotiatorlocation. If omitted, the default pool negotiator is assumed.
-
deleteUser(user)¶ Delete all records of a user from the Negotiator’s fair-share accounting.
Parameters: user (str) – A fully-qualified user name, i.e., USER@DOMAIN.
-
getPriorities([(bool)rollup = False])¶ Retrieve the pool accounting information, one per entry.Returns a list of accounting ClassAds.
Parameters: rollup (bool) – Set to Trueif accounting information, as applied to hierarchical group quotas, should be summed for groups and subgroups.Returns: A list of accounting ads, one per entity. Return type: list[ ClassAd]
-
getResourceUsage((str)user)¶ Get the resources (slots) used by a specified user.
Parameters: user (str) – A fully-qualified user name, USER@DOMAIN.Returns: List of ads describing the resources (slots) in use. Return type: list[ ClassAd]
-
resetAllUsage()¶ Reset all usage accounting. All known user records in the negotiator are deleted.
-
resetUsage(user)¶ Reset all usage accounting of the specified user.
Parameters: user (str) – A fully-qualified user name, USER@DOMAIN.
-
setBeginUsage(user, value)¶ Manually set the time that a user begins using the pool.
Parameters:
-
setLastUsage(user, value)¶ Manually set the time that a user last used the pool.
Parameters:
-
setFactor(user, factor)¶ Set the priority factor of a specified user.
Parameters:
-
setPriority(user, prio)¶ Set the real priority of a specified user.
Parameters:
-
-
class
htcondor.Startd¶
-
class
htcondor.SecMan¶ A class, representing the internal HTCondor security state.
If a security session becomes invalid, for example, because the remote daemon restarts, reuses the same port, and the client continues to use the session, then all future commands will fail with strange connection errors. This is the only mechanism to invalidate in-memory sessions.
The
SecMancan also behave as a context manager; when created, the object can be used to set temporary security configurations that only last during the lifetime of the security object.-
__init__()¶ Create a SecMan object.
-
invalidateAllSessions()¶ Invalidate all security sessions. Any future connections to a daemon will cause a new security session to be created.
-
ping(ad, command='DC_NOP')¶ Perform a test authorization against a remote daemon for a given command.
Parameters: - ad (str or
ClassAd) – The ClassAd of the daemon as returned byCollector.locate(); alternately, the sinful string can be given directly as the first parameter. - command – The DaemonCore command to try; if not given,
'DC_NOP'will be used.
Returns: An ad describing the results of the test security negotiation.
Return type: - ad (str or
-
getCommandString(commandInt)¶ Return the string name corresponding to a given integer command.
-
setConfig(key, value)¶ Set a temporary configuration variable; this will be kept for all security sessions in this thread for as long as the
SecManobject is alive.Parameters:
-
setGSICredential(filename)¶ Set the GSI credential to be used for security negotiation.
Parameters: filename (str) – File name of the GSI credential.
-
setPoolPassword(new_pass)¶ Set the pool password
Parameters: new_pass (str) – Updated pool password to use for new security negotiations.
-
setTag(tag)¶ Set the authentication context tag for the current thread.
All security sessions negotiated with the same tag will only be utilized when that tag is active.
For example, if thread A has a tag set to
Joeand thread B has a tag set toJane, then all security sessions negotiated for thread A will not be used for thread B.Parameters: tag (str) – New tag to set.
-
-
class
htcondor.Claim¶ The
Claimclass provides access to HTCondor’s Compute-on-Demand facilities. The class represents a claim of a remote resource; it allows the user to manually activate a claim (start a job) or release the associated resources.The claim comes with a finite lifetime - the lease. The lease may be extended for as long as the remote resource (the Startd) allows.
-
__init__(ad)¶ Create a
Claimobject of a given remote resource. The ad provides a description of the resource, as returned byCollector.locate().This only stores the remote resource’s location; it is not contacted until
requestCOD()is invoked.Parameters: ad ( ClassAd) – Location of the Startd to claim.
-
requestCOD(constraint, lease_duration)¶ Request a claim from the condor_startd represented by this object.
On success, the
Claimobject will represent a valid claim on the remote startd; other methods, such asactivate()should now function.Parameters: - constraint (str) – ClassAd expression that pecifies which slot in
the startd should be claimed. Defaults to
'true', which will result in the first slot becoming claimed. - lease_duration (int) – Indicates how long the claim should be valid.
Defaults to
-1, which indicates to lease the resource for as long as the Startd allows.
- constraint (str) – ClassAd expression that pecifies which slot in
the startd should be claimed. Defaults to
-
activate(ad)¶ Activate a claim using a given job ad.
Parameters: ad – Description of the job to launch; this uses similar, but not identical attribute names as condor_submit. See the HTCondor manual for a description of the job language.
-
release(vacate_type)¶ Release the remote
condor_startdfrom this claim; shut down any running job.Parameters: vacate_type ( VacateTypes) – Indicates the type of vacate to perform for the running job.
-
suspend()¶ Temporarily suspend the remote execution of the COD application. On Unix systems, this is done using
SIGSTOP.
-
resume()¶ Resume the temporarily suspended execution. On Unix systems, this is done using
SIGCONT.
-
renew()¶ Renew the lease on an existing claim. The renewal should last for the value of
lease_durationprovided to__init__().
-
deactivate()¶ Deactivate a claim; shuts down the currently running job, but holds onto the claim for future activation.
-
-
class
htcondor.ScheddNegotiate¶ The
ScheddNegotiateclass represents an ongoing negotiation session with a schedd. It is a context manager, returned by thenegotiate()method.-
sendClaim(claim, offer, request)¶ Send a claim to the schedd; if possible, the schedd will activate this and run one or more jobs.
Parameters: - claim (str) – The claim ID, typically from the
Capabilityattribute in the corresponding Startd’s private ad. - offer (
ClassAd) – A description of the resource claimed (typically, the machine’s ClassAd). - request (
ClassAd) – The resource request this claim is responding to; if not provided (default), the Schedd will decide which job receives this resource.
- claim (str) – The claim ID, typically from the
-
disconnect()¶ Disconnect from this negotiation session. This can also be achieved by exiting the context.
-
-
class
htcondor._Param¶ A dictionary-like object for the local HTCondor configuration; the keys and values of this object are the keys and values of the HTCondor configuration.
The
get,setdefault,update,keys,items, andvaluesmethods of this class have the same semantics as a python dictionary.Writing to a
_Paramobject will update the in-memory HTCondor configuration.
-
class
htcondor.JobEventLog¶ An iterable object (and iterable context manager) corresponding to a specific file on disk containing a user event log. By default, it waits for new events, but it may be used to poll for them, as follows:
import htcondor jel = htcondor.JobEventLog("file.log") # Read all currently-available events without blocking. for event in jel.events(0): print(event) else: print("We found the the end of file")
-
__init__(filename)¶
Create an instance of the
JobEventLogclass.Parameters: filename – Filename of the job event log. -
events(stop_after=None)¶
Return an iterator (self), which yields
JobEventobjects. The iterator may yield any number of events, including zero, before throwingStopIteration, which signals end-of-file. You may iterate again with the sameJobEventLogto check for new events.Parameters: stop_after – Stop waiting for new events after this many seconds. If None, never stop waiting for new events. If0, do not wait for new events.-
close()¶
Closes any open underlying file. Subsequent iterations on this
JobEventLogobject will immediately terminate (will never return anotherJobEvent).-
-
class
htcondor.JobEvent¶ An immutable dictionary-like object corresponding to a particular event in the user log. All events define the following attributes. Other type-specific attributes are keys of the dictionary.
JobEventobjects support bothinoperators (if "attribute" in jobEventandfor attributeName in jobEvent) and may be passed as arguments tolen.Note
Although the attribute type is a
JobEventTypetype, when acting as dictionary, aJobEventobject returns types as if it were aClassAd, so comparisons to enumerated values must use the == operator. (No current event type hasExprTreevalues.)-
type¶ Type: htcondor.JobEventTypeThe event type.
-
cluster¶ The cluster ID.
-
proc¶ The proc ID.
-
timestamp¶ When the event was recorded.
-
Esoteric Module-Level Functions¶
-
htcondor.send_command(ad, dc, target = None)¶ Send a command to an HTCondor daemon specified by a location ClassAd.
Parameters: - ad (
ClassAd) – Specifies the location of the daemon (typically, found by usingCollector.locate(). - dc (
DaemonCommands) – A command type - target (str) – An additional command to send to a daemon. Some commands
require additional arguments; for example, sending
DaemonOffto acondor_masterrequires one to specify which subsystem to turn off.
- ad (
-
htcondor.send_alive(ad, pid = None, timeout = -1)¶ Send a keep alive message to an HTCondor daemon.
This is used when the python process is run as a child daemon under the
condor_master.Parameters: - ad (
ClassAd) – AClassAdspecifying the location of the daemon. This ad is typically found by usingCollector.locate(). - pid (int) – The process identifier for the keep alive. The default value of
Noneuses the value fromos.getpid(). - timeout (int) – The number of seconds that this keep alive is valid. If a
new keep alive is not received by the condor_master in time, then the
process will be terminated. The default value is controlled by configuration
variable
NOT_RESPONDING_TIMEOUT.
- ad (
-
htcondor.set_subsystem(name, daemon_type = Auto)¶ Set the subsystem name for the object.
The subsystem is primarily used for the parsing of the HTCondor configuration file.
Parameters: - name (str) – The subsystem name.
- daemon_type (
SubsystemType) – The HTCondor daemon type. The default value of Auto infers the type from the name parameter.
-
htcondor.lock(file_obj, lock_type)¶ Take a lock on a file object using the HTCondor locking protocol (distinct from typical POSIX locks).
Parameters: - file_obj (file) – is a file object corresponding to the file which should be locked.
- lock_type (
LockType) – The kind of lock to acquire.
Returns: A context manager object; the lock is released when the context manager object is exited.
Return type:
Iterator and Helper Classes¶
-
class
htcondor.HistoryIterator¶ An iterator class for managing results of the
Schedd.history()method.-
next()¶ Returns: the next available history ad. Return type: ClassAdRaises: StopIteration – when no additional ads are available.
-
-
class
htcondor.QueryIterator¶ An iterator class for managing results of the
Schedd.query()andSchedd.xquery()methods.-
next(mode=BlockingMode.Blocking)¶ Parameters: mode ( BlockingMode) – The blocking mode for this call tonext(); defaults toBlocking.Returns: the next available job ad. Return type: ClassAdRaises: StopIteration – when no additional ads are available.
-
nextAdsNonBlocking()¶ Retrieve as many ads are available to the iterator object.
If no ads are available, returns an empty list. Does not throw an exception if no ads are available or the iterator is finished.
Returns: Zero-or-more job ads. Return type: list[ ClassAd]
-
tag()¶ Retrieve the tag associated with this iterator; when using the
poll()method, this is useful to distinguish multiple iterators.Returns: the query’s tag.
-
done()¶ Returns: Trueif the iterator is finished;Falseotherwise.
-
watch()¶ Returns an
inotify-based file descriptor; if this descriptor is given to aselect()instance,selectwill indicate this file descriptor is ready to read whenever there are more jobs ready on the iterator.If
inotifyis not available on this platform, this will return-1.Returns: A file descriptor associated with this query. Return type: int
-
-
class
htcondor.BulkQueryIterator¶ Returned by
poll(), this iterator produces a sequence ofQueryIteratorobjects that have ads ready to be read in a non-blocking manner.Once there are no additional available iterators,
poll()must be called again.-
next()¶ Returns: The next available QueryIteratorthat can be read without blocking.Return type: QueryIteratorRaises: StopIteration – if no more iterators are ready.
-
Useful Enumerations¶
-
class
htcondor.DaemonTypes¶ An enumeration of different types of daemons available to HTCondor.
-
Collector¶ Ads representing the
condor_collector.
-
Negotiator¶ Ads representing the
condor_negotiator.
-
Schedd¶ Ads representing the
condor_schedd.
-
Startd¶ Ads representing the resources on a worker node.
-
HAD¶ Ads representing the high-availability daemons (
condor_had).
-
Master¶ Ads representing the
condor_master.
-
Generic¶ All other ads that are not categorized as above.
-
Any¶ Any type of daemon; useful when specifying queries where all matching daemons should be returned.
-
-
class
htcondor.AdTypes¶ A list of different types of ads that may be kept in the
condor_collector.-
Any¶ Type representing any matching ad. Useful for queries that match everything in the collector.
-
Collector¶ Ads from the
condor_collectordaemon.
-
Generic¶ Generic ads, associated with no particular daemon.
-
Grid¶ Ads associated with the grid universe.
-
HAD¶ Ads produced by the
condor_had.
-
License¶ License ads. These do not appear to be used by any modern HTCondor daemon.
-
Master¶ Master ads, produced by the
condor_masterdaemon.
-
Negotiator¶ Negotiator ads, produced by the
condor_negotiatordaemon.
-
Schedd¶ Schedd ads, produced by the
condor_schedddaemon.
-
Startd¶ Startd ads, produced by the
condor_startddaemon. Represents the available slots managed by the startd.
-
StartdPrivate¶ The “private” ads, containing the claim IDs associated with a particular slot. These require additional authorization to read as the claim ID may be used to run jobs on the slot.
-
Submitter¶ Ads describing the submitters with available jobs to run; produced by the
condor_scheddand read by thecondor_negotiatorto determine which users need a new negotiation cycle.
-
-
class
htcondor.JobAction¶ Different actions that may be performed on a job in queue.
-
Hold¶ Put a job on hold, vacating a running job if necessary. A job will stay in the hold state until explicitly acted upon by the admin or owner.
-
Release¶ Release a job from the hold state, returning it to
Idle.
-
Suspend¶ Suspend the processes of a running job (on Unix platforms, this triggers a
SIGSTOP). The job’s processes stay in memory but no longer get scheduled on the CPU.
-
Continue¶ Continue a suspended jobs (on Unix,
SIGCONT). The processes in a previously suspended job will be scheduled to get CPU time again.
-
Remove¶ Remove a job from the Schedd’s queue, cleaning it up first on the remote host (if running). This requires the remote host to acknowledge it has successfully vacated the job, meaning
Removemay not be instantaneous.
-
RemoveX¶ Immediately remove a job from the schedd queue, even if it means the job is left running on the remote resource.
-
Vacate¶ Cause a running job to be killed on the remote resource and return to idle state. With
Vacate, jobs may be given significant time to cleanly shut down.
-
VacateFast¶ Vacate a running job as quickly as possible, without providing time for the job to cleanly terminate.
-
-
class
htcondor.DaemonCommands¶ Various state-changing commands that can be sent to to a HTCondor daemon using
send_command().-
DaemonOff¶
-
DaemonOffFast¶
-
DaemonOffPeaceful¶
-
DaemonsOff¶
-
DaemonsOffFast¶
-
DaemonsOffPeaceful¶
-
OffFast¶
-
OffForce¶
-
OffGraceful¶
-
OffPeaceful¶
-
Reconfig¶
-
Restart¶
-
RestartPeacful¶
-
SetForceShutdown¶
-
SetPeacefulShutdown¶
-
-
class
htcondor.TransactionFlags¶ Flags affecting the characteristics of a transaction.
-
NonDurable¶ Non-durable transactions are changes that may be lost when the
condor_scheddcrashes.NonDurableis used for performance, as it eliminates extrafsync()calls.
-
SetDirty¶ This marks the changed ClassAds as dirty, causing an update notification to be sent to the
condor_shadowand thecondor_gridmanager, if they are managing the job.
-
ShouldLog¶ Causes any changes to the job queue to be logged in the relevant job event log.
-
-
class
htcondor.QueryOpts¶ Flags sent to the
condor_scheddduring a query to alter its behavior.-
Default¶ Queries should use all default behaviors.
-
AutoCluster¶ Instead of returning job ads, return an ad per auto-cluster.
-
-
class
htcondor.BlockingMode¶ Controls the behavior of query iterators once they are out of data.
-
Blocking¶ Sets the iterator to block until more data is available.
-
NonBlocking¶ Sets the iterator to return immediately if additional data is not available.
-
-
class
htcondor.DrainTypes¶ Draining policies that can be sent to a
condor_startd.-
Fast¶
-
Graceful¶
-
Quick¶
-
-
class
htcondor.SubsystemType¶ An enumeration of known subsystem names.
-
Collector¶
-
Daemon¶
-
Dagman¶
-
GAHP¶
-
Job¶
-
Master¶
-
Negotiator¶
-
Schedd¶
-
Shadow¶
-
Startd¶
-
Starter¶
-
Submit¶
-
Tool¶
-
-
class
htcondor.LogLevel¶ The log level attribute to use with
log(). Note that HTCondor mixes both a class (debug, network, all) and the header format (Timestamp, PID, NoHeader) within this enumeration.-
Always¶
-
Audit¶
-
Config¶
-
DaemonCore¶
-
Error¶
-
FullDebug¶
-
Hostname¶
-
Job¶
-
Machine¶
-
Network¶
-
NoHeader¶
-
PID¶
-
Priv¶
-
Protocol¶
-
Security¶
-
Status¶
-
SubSecond¶
-
Terse¶
-
Timestamp¶
-
Verbose¶
-
-
class
htcondor.JobEventType¶ The type event of a user log event; corresponds to
ULogEventNumberin the C++ source.-
SUBMIT¶
-
EXECUTE¶
-
EXECUTABLE_ERROR¶
-
CHECKPOINTED¶
-
JOB_EVICTED¶
-
JOB_TERMINATED¶
-
IMAGE_SIZE¶
-
SHADOW_EXCEPTION¶
-
GENERIC¶
-
JOB_ABORTED¶
-
JOB_SUSPENDED¶
-
JOB_UNSUSPENDED¶
-
JOB_HELD¶
-
JOB_RELEASED¶
-
NODE_EXECUTE¶
-
NODE_TERMINATED¶
-
POST_SCRIPT_TERMINATED¶
-
GLOBUS_SUBMIT¶
-
GLOBUS_SUBMIT_FAILED¶
-
GLOBUS_RESOURCE_UP¶
-
GLOBUS_RESOURCE_DOWN¶
-
REMOTE_ERROR¶
-
JOB_DISCONNECTED¶
-
JOB_RECONNECTED¶
-
JOB_RECONNECT_FAILED¶
-
GRID_RESOURCE_UP¶
-
GRID_RESOURCE_DOWN¶
-
GRID_SUBMIT¶
-
JOB_AD_INFORMATION¶
-
JOB_STATUS_UNKNOWN¶
-
JOB_STATUS_KNOWN¶
-
JOB_STAGE_IN¶
-
JOB_STAGE_OUT¶
-
ATTRIBUTE_UPDATE¶
-
PRESKIP¶
-
CLUSTER_SUBMIT¶
-
CLUSTER_REMOVE¶
-
FACTORY_PAUSED¶
-
FACTORY_RESUMED¶
-
NONE¶
-
FILE_TRANSFER¶
-