GitHub user geomacy opened a pull request:
https://github.com/apache/brooklyn-server/pull/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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/geomacy/brooklyn-server result-codes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/207.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #207
----
commit 7ece3a8d5f3a302a1c1635632e7d616f27ca3d07
Author: Geoff Macartney <[email protected]>
Date: 2016-06-16T08:57:28Z
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.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---