cylc/cylc — pull request #201 by ScottWales (2012-12-07 06:07:36+00:00)
Title: Send environment variables as arguments

When using ssh remote messaging with Cylc it sends information about
what suite a message belongs to with environement variables. These
variables have been sent using a bash wrapper around 'cylc message' and
similar.

For security reasons some HPC sites may wish to restrict what commands
may be run by unattended ssh connections. This patch is the first step
in allowing the bash wrapper to be removed if desired, so that remote
commands may be limited to 'started', 'finished' or 'error'.

Environment variables may now be passed to cylc like

cylc --env=NAME=value

Arguments matching this pattern are parsed by the Cylc driver, turned
into environment variables and removed from the argument list before
starting a subprogram.

Remote messages now use this pattern to send environment variables,
rather than adding them to the wrapper script.

Also included is a refactoring of the remote command invocation, to
ensure that the verbose mode output matches the command that is called.