cloudfoundry/container_tools — pull request #3 by sykesm (2013-12-17 14:11:03+00:00)
Title: Save failed script results in WardenError

Staging is run by the DEA in a container via the 'run_script' facility. Because of how loggregator reads staging messages, failures during staging prevent any diagnostic output from being presented to the user. In order to capture some of this diagnostic info without restructuring a lot of code, the `Container::WardenError` has been extended to
capture and hold the failed script results for the caller to access.

A corresponding change in the staging task uses this result to emit stdout and stderr as staging output to the client.

For what it's worth, I believe the *right* way to do this is to stream the log data as staging is running. I'll be looking into that but the lack of any diagnostics from a failed staging attempt is painful.