The individual LSST camera parts (CCDs and their larger aggregates in the form of RTMs) undergo a series of acceptance tests and analysis. Many of the procedures for this are implemented by running software of some sort. This software runs on a variety of platforms, is programmed in a variety of languages and is written by collaborators and some may be commercial/proprietary. Each software-based procedure is broken down into one or more jobs. The running of these jobs and the organization of their results are managed by higher level software dubbed the job harness. Its primary purpose is to manage the complexity from the diversity of software. The harness also interfaces the jobs with the Laboratory Information Management System (LIMS) and with the archive file system. This note describes the design of the job harness, its interaction with LIMS and the requirements that it makes on the software that it runs. (This note is version srcsh[:exports results]{git show-ref -s refs/heads/master}.)
Some elements of the system are given canonical identifiers. These names are used, following a shared convention, by the job harness, LIMS among other systems. Things with canonical identifiers include:
Besides these there are additional terms that are used with specific meaning in this note.
The role of the job harness is described briefly in this section by breaking down the cycle of executing one job into a number of steps. The following sections contain some additional details.
Each invocation of the harness is parameterized. Parameters may be set through a variety of means: environment, configuration files or user interface (command line) arguments.
The configuration parameters are resolved in four ordered steps:
[DEFAULT] will update the configuration.
Specifics of each configuration step are given in the following sections.
Configuration parameters may be specified with environment variables.
A parameter's variable name must be constructed by capitalizing the parameter
name and prepending it with LCATR_. Some of these variables may be
specified in a modulefile as described in Section Job Environment.
Zero or more configuration files found in various locations will be read by the harness. The files checked are:
~/.lcatr.cfg ./lcatr.cfg
They may provide configuration parameters in two ways. First, the
[DEFAULT] section overrides any parameters supplied by environment
variables. For example one could "hard code" the unit type for all
tests run from a given account by adding to ~/.lcatr.cfg a section
like:
[DEFAULT] unit_type = CCD
This could then be overridden via parameters set by the user interface.
Second, after any command line parameters are applied (see below) the
files are checked a second time for any sections that match the
key/value name of any existing parameters. For example a section
named [site BNL] matches the parameter site with the value BNL
and might it define information about that site's archive and the
operator of the account in which the configuration file is placed.
[site BNL] archive_root = /lssd/nfsdata0/ccdtest archive_user = bvastro archive_host = rftpexp.rhic.bnl.gov operator = bviren
Any parameters listed in the matching section and not yet set by another mechanism will be applied but they will not override any previously set parameters. That is, this mechanism allows specification of a set of default parameters that may be activated based on the value of another parameter. Setting any of these parameters via another means will override their settings here.
The main Python job.Job class constructor accepts as keywords zero
or more parameters. The default, command line interface to the
harness can likewise be given parameters via arguments like:
--parameter_name=value
This will set the parameter parameter_name to the value value.
Setting parameters by via the user interface overrides any values that
may have been set by other means.
The configuration parameters understood by the harness are:
contextsite, local and job. It may be used to organize
default parameters.
sitelocaljobversionoperatorarchive_rootarchive_userarchive_root.
archive_hoststage_rootlims_urlinstall_areamodulesdependenciesmodules_homeinit/ sub
directory)
modules_versionmodules_cmdmodulescmd program.
modules_pathBased on the input parameters and the allocated job ID the job-specific environment is configured. This environment is defined through an Environment Module1 description file called a modulefile. Besides job-specific environment the modulefile must adhere to various conventions in support of the job harness. The software implementing a job must be installed on the host computer in a manner that controls and records its version. Details on this are available elsewhere.
All output files from production jobs are stored on disk in an organized file system directory hierarchy. The full set of result files are centrally stored for each site in the archive directory hierarchy. Each time a job runs a local stage directory hierarchy is first populated as needed. If a job requires as input the files output from a prior job they are copied to the local stage by the harness. When the job runs it populates its own specific directory with any output files. If the job is successful the harness copies the freshly produced results into the corresponding directory in the archive.
The archive and locally staged file hierarchy are organized in a specific manner and based on the input parameters given to the job harness and the allocated job ID. Each run of each job results in a unique directory being created and populated, first rooted in the local stage and, if the job succeeds, copied to the central site archive.
The directory chain is named, in order, using the:
CCD/)
1234/)
ptc/)
v42/)
001234/)
The pattern describing the directory layout is shared by the job harness, the ingest process, the LIMS web application and any others that must locate a file.
Before a job's production step runs (see below) the local stage file system is checked to assure the job's output directory does not yet exist. The archive is checked to assure the existence of a directory associated with the run of each job on which the current job depends. If these checks fail the harness aborts. Otherwise the dependency directories are copied from the archive to their corresponding locations on the local stage and the job's output directory is created and becomes the harness's current working directory. Likewise, after the validation step succeeds the job's directory and its contents are copied from the local stage to the archive. This checking and copying are done over an SSH connection
The running of the software is split into two steps. A production step produces files of results in whatever formats are convenient to the test software developer. A followup validation step provides a hook to validate the content of these files and produce the required result summary and meta-data files in the standard formats.
This step implements the main part of the job. It involves running a
single program from the prepared and empty output directory as
described above, logging any output and checking the return code
(nonzero indicates failure). This program will typically be
implemented as a thin script that glues into the job harness whatever
code the test owner has developed. The program
to run is specified by the LCATR_PRODUCER environment variable
that is set in the modulefile corresponding to the installed job
software release. When executed by the harness, the program is given
no command line arguments. Any input parameters it needs must be
taken from the environment. This includes the standard LCATR_
variables defined through the configuration mechanism and any
software-specific variables defined in the modulefile.
With these requirements satisfied the program must otherwise fulfill whatever duties it was written for and produce whatever result files in whatever format the software developer has determined.
From the point of view of the harness, this step is essentially the
same as the production step and only differs in what it is expected to
accomplish. Again a single program, as specified by the
LCATR_VALIDATOR variable, is executed with no command line
arguments. It is run from the same directory as was the producer and
any output it creates is logged. It too must return a nonzero error
code to indicate failure.
In addition to performing whatever validation is required by the
validation program must produce a file containing a summary of the
results to be uploaded to the LIMS database. This file should be in a
format described in the document "LCATR Schema". The file should be
named summary.lims. The harness will implicitly check the contents
of this file against its declared schemas.
The Laboratory Information Management System (LIMS) is briefly described in this section with an emphasis on how it interfaces with the harness. Additional details on LIMS can be found elsewhere.
In addition to its other duties not directly related to the job harness, LIMS captures all meta data and a summary of result data about all tests done on a CCD (or RTM) unit. It provides a database containing the test history, current status and the eventual acceptance judgment of each unit based on the test results. It is fronted with a web application that allows browsing and querying of the database.
The following sections describe how the job harness interfaces with LIMS.
Every production run of a job is given a site-unique identifier (job ID). This job ID is allocated through LIMS via an HTTP query which registers the following information:
LIMS replies to the query with the job ID. If the job requires data produced by other, prior jobs the query will also return the registered information about those jobs necessary to locate their output files. See the document The LIMS and Job Harness API for details on these parameters.
Among its other duties, LIMS records the status of jobs as reported to it by the job harness. This status progresses through a series of states starting with the registration described above. All subsequent states are recorded by providing the allocated job ID and state identifier from the following list.
After the archived (and optionally the purged) state has been reached the job harness exits.
After the archived state has been recorded the results are candidates for ingesting into LIMS. The details of this process are described elsewhere but the ingest process will use job ID and LIMS to resolve the initial registration parameters so that the metadata file the one or more result summary files can be located, their contents read and uploaded to the LIMS database.
1 See http://modules.sf.net/.
Date: 2014-10-03 11:45:18 PDT
HTML generated by org-mode 6.21b in emacs 23