PagerDuty / blender

A modular orchestration engine
https://github.com/PagerDuty/blender
Other
183 stars 8 forks source link

Separate output from different hosts multi ssh #53

Closed margueritepd closed 8 years ago

margueritepd commented 8 years ago

summary

This changeset is for the SSH drivers. The results of this change are that when an error is raised during execution, in either ssh-multi or not-multi, instead of a single file descriptor being raised with the error, a json hash containing the standard error/output by host will be raised.

tests

I did not update the tests because that would have been a nightmare because we use multi-ssh. I do however have a PR incoming for blender-integration which should cover the multi-ssh case.

concerns

@ranjib suggested allowing the user to change what type of object would receive the standard error / output. This is a really good idea, but I ran out of energy, so I would be happy to pass that work onto someone else :)

One other possible objection to this PR (brought up by @nickpegg in https://github.com/PagerDuty/blender/pull/50) is that I am changing the object type in the stderr and stdout fields in the object returned by run_command. A couple points on that:

I can however address this if people think it's important, either by making the output returned by run_command a string, or a file descriptor.

margueritepd commented 8 years ago

I am going to merge this despite travis saying that it fails, because my build passes when I remove directory caching in travis. passing travis build change I made to get that build