Closes #207 Ensure detection of failed pre.install.command and related commands.
Currently 'pre.install.command' and related steps do not fail if the command(s) returns a non-zero exit. This can mean your install will fail but Brooklyn won't detect it (perhaps until some subsequent stage, or not at all). This change adds detection of the return code and failure if it is non-zero. The 'contract' for the methods is added as a comment. The AbstractSoftwareProcessSshDriver is changed to detect the failure and throw an exception. The AbstractSoftwareProcessWinRmDriver already does the right thing and doesn't need changed. While this could break some existing blueprints, I think in such cases it's more likely that it is highlighting a problem that has been missed, rather than causing a problem because someone is explicitly relying on that behaviour. Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/ee3ca1e7 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/ee3ca1e7 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/ee3ca1e7 Branch: refs/heads/master Commit: ee3ca1e71828b56c824d0512ea3180831169b6d7 Parents: b6a6565 d76315f Author: Svetoslav Neykov <[email protected]> Authored: Fri Jun 17 14:04:16 2016 +0300 Committer: Svetoslav Neykov <[email protected]> Committed: Fri Jun 17 14:04:16 2016 +0300 ---------------------------------------------------------------------- .../base/AbstractSoftwareProcessDriver.java | 41 +++++++++++++++- .../base/AbstractSoftwareProcessSshDriver.java | 50 ++++++++++++-------- .../base/SoftwareProcessEntityTest.java | 44 +++++++++++++++++ 3 files changed, 115 insertions(+), 20 deletions(-) ----------------------------------------------------------------------
