[PATCH] Fix RT #116 add timestamps to deploy messages

Lars Wirzenius lars.wirzenius at codethink.co.uk
Tue Jun 18 11:58:50 BST 2013

On Mon, Jun 17, 2013 at 02:35:18PM +0100, Richard Maw wrote:
> Unfortunately I think this is the wrong solution. Write extensions can
> be any form of executable. tar.write is a shell script.
> I would try morphlib/plugins/deploy_plugin.py. DeployPlugin._run_extension
> looks like a good place to start.

I concur. What we need is to have morph itself add the timestamps, not each
extension. That way, we can get the timestamps for both configuration and
write extensions.

Unfortunately, this may be slightly trickier to do than I initially thought:
the extensions are run with cliapp's runcmd function, which is blocking: it
only returns after the whole subprocess has finished. However, since runcmd
also supports pipelines, we could add another step to the end of the pipeline,
and have that add the timestamps: essentially doing this:

    ./rawdisk.write FOO BAR | ts

(for those who have ts on their systems; we don't have it in Baserock).

http://www.codethink.co.uk/ http://wiki.baserock.org/ http://www.baserock.com/

More information about the baserock-dev mailing list