PanDAService¶
-
class
lsst.ctrl.bps.panda.
PanDAService
(config)¶ Bases:
lsst.ctrl.bps.BaseWmsService
PanDA version of WMS service
Methods Summary
cancel
(wms_id[, pass_thru])Cancel submitted workflows/jobs. list_submitted_jobs
([wms_id, user, …])Query WMS for list of submitted WMS workflows/jobs. ping
([pass_thru])Checks whether WMS services are up, reachable, and can authenticate if authentication is required. prepare
(config, generic_workflow[, out_prefix])Create submission for a generic workflow for a specific WMS. report
([wms_workflow_id, user, hist, …])Query WMS for status of submitted WMS workflows. restart
(wms_workflow_id)Restart a workflow from the point of failure. run_submission_checks
()Checks to run at start if running WMS specific submission steps. submit
(workflow)Submit a single WMS workflow Methods Documentation
-
cancel
(wms_id, pass_thru=None)¶ Cancel submitted workflows/jobs.
Parameters: Returns:
-
list_submitted_jobs
(wms_id=None, user=None, require_bps=True, pass_thru=None, is_global=False)¶ Query WMS for list of submitted WMS workflows/jobs.
This should be a quick lookup function to create list of jobs for other functions.
Parameters: - wms_id :
int
orstr
, optional Id or path that can be used by WMS service to look up job.
- user :
str
, optional User whose submitted jobs should be listed.
- require_bps :
bool
, optional Whether to require jobs returned in list to be bps-submitted jobs.
- pass_thru :
str
, optional Information to pass through to WMS.
- is_global :
bool
, optional If set, all available job queues will be queried for job information. Defaults to False which means that only a local job queue will be queried for information.
Only applicable in the context of a WMS using distributed job queues (e.g., HTCondor). A WMS with a centralized job queue (e.g. PanDA) can safely ignore it.
Returns: - job_ids :
list
[Any
] Only job ids to be used by cancel and other functions. Typically this means top-level jobs (i.e., not children jobs).
- wms_id :
-
ping
(pass_thru=None)¶ Checks whether WMS services are up, reachable, and can authenticate if authentication is required.
The services to be checked are those needed for submit, report, cancel, restart, but ping cannot guarantee whether jobs would actually run successfully.
Parameters: - pass_thru :
str
, optional Information to pass through to WMS.
Returns: - pass_thru :
-
prepare
(config, generic_workflow, out_prefix=None)¶ Create submission for a generic workflow for a specific WMS.
Parameters: - config :
lsst.ctrl.bps.BpsConfig
BPS configuration.
- generic_workflow :
lsst.ctrl.bps.GenericWorkflow
Generic representation of a single workflow
- out_prefix :
str
Prefix for all WMS output files
Returns: - wms_workflow :
BaseWmsWorkflow
Prepared WMS Workflow to submit for execution
- config :
-
report
(wms_workflow_id=None, user=None, hist=0, pass_thru=None, is_global=False)¶ Query WMS for status of submitted WMS workflows.
Parameters: - wms_workflow_id :
int
orstr
, optional Id that can be used by WMS service to look up status.
- user :
str
, optional Limit report to submissions by this particular user.
- hist :
int
, optional Number of days to expand report to include finished WMS workflows.
- pass_thru :
str
, optional Additional arguments to pass through to the specific WMS service.
- is_global :
bool
, optional If set, all available job queues will be queried for job information. Defaults to False which means that only a local job queue will be queried for information.
Only applicable in the context of a WMS using distributed job queues (e.g., HTCondor). A WMS with a centralized job queue (e.g. PanDA) can safely ignore it.
Returns: - run_reports :
list
[lsst.ctrl.bps.WmsRunReport
] Status information for submitted WMS workflows.
- message :
str
Message to user on how to find more status information specific to this particular WMS.
- wms_workflow_id :
-
restart
(wms_workflow_id)¶ Restart a workflow from the point of failure.
Parameters: - wms_workflow_id :
str
Id that can be used by WMS service to identify workflow that need to be restarted.
Returns: - wms_id :
str
Id of the restarted workflow. If restart failed, it will be set to None.
- run_name :
str
Name of the restarted workflow. If restart failed, it will be set to None.
- message :
str
A message describing any issues encountered during the restart. If there were no issue, an empty string is returned.
- wms_workflow_id :
-
run_submission_checks
()¶ Checks to run at start if running WMS specific submission steps.
Any exception other than NotImplementedError will halt submission. Submit directory may not yet exist when this is called.
-
submit
(workflow)¶ Submit a single WMS workflow
Parameters: - workflow :
lsst.ctrl.bps.BaseWmsWorkflow
Prepared WMS Workflow to submit for execution
- workflow :
-