Hello DC1ers,

We all recognize that the current Policy handling is a temporary solution
awaiting its XML-based replacement.  However, working in the here and now
and dealing with integrating various prototype pipelines (Consumer and WCS) 
and servers (dbingest/dbworker), I see that some of the stop-gap solutions 
have resulted in code with inconsistent policy module requirements.

The major problem of the moment, is ensuring that LSST support modules 
(for example: StarSourceMatchCollection) are able to find their relevant 
policy files. The placement of a pipeline's relevant policy files into
a single directory (ultimately fabricated and provided by the pacman startup 
procedure) has simplified the problem. What remains is to make that
pathname well-known to the code ensemble.

The current method of passing that pathname around as an explicit
argument to each mpi (or other) process which then passes it down the call
chain to python modules or c functions is tedious.

JonM and Russell, and then JonM and I, explored two simple options:
1) as each process is initiated, the policy directory pathname would be
   loaded into 'global memory';
2) the pipeline harness code would load the policy directory pathname into an
    environment variable on startup.
I chose the latter as the simplest interface which worked without effort for 
both C and python code. 

I've tested pipeline harness code which 
* takes the policy directory pathname provided to the pipeline harness 
* then sets an environment variable, LSST_POLICY_DIR.
The Policy {module, c function} automatically prepends $LSST_POLICY_DIR
  to a requested policy filename if that filename is not rooted at '/'.

The only module for which the change hasn't been tested is dbingest.
The one line mods in both dbingestinit.py and dbingestworker.py were made 
to ensure the codes work identically as before.

I will be SVN committing the changes very soon. My testing was done 
on lsstarchive due to the TG unscheduled downtime yesterday and today.

Robyn
_______________________________________________
LSST-data mailing list
[email protected]
http://www.lsstmail.org/mailman/listinfo/lsst-data

Reply via email to