brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geomacy <...@git.apache.org>
Subject [GitHub] brooklyn-server pull request #207: Ensure detection of failed pre.install.co...
Date Fri, 17 Jun 2016 09:40:15 GMT
Github user geomacy commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/207#discussion_r67484653
  
    --- Diff: software/base/src/main/java/org/apache/brooklyn/entity/software/base/AbstractSoftwareProcessSshDriver.java
---
    @@ -285,45 +296,54 @@ public void copyInstallResources() {
             }
         }
     
    +    private void executeSuccessfully(ConfigKey<String> configKey, String label)
{
    +        log.debug("Executing {} on entity {}", label, entity.getDisplayName());
    +        int result = execute(ImmutableList.of(getEntity().getConfig(configKey)), label);
    +        if (0 != result) {
    +            log.debug("Executing {} failed with return code {}", label, result);
    +            throw new IllegalStateException("commands for " + configKey.getName() + "
failed with return code " + result);
    +        }
    +    }
    +
         @Override
         public void runPreInstallCommand() {
             if(Strings.isNonBlank(getEntity().getConfig(BrooklynConfigKeys.PRE_INSTALL_COMMAND)))
{
    --- End diff --
    
    That would be cleaner, let me do that.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message