Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/481
  
    @googlielmo (cc @andreaturli) to fix `SshjToolIntegrationTest` (the 
`testAsync.*` tests), you'll need this fix:
    
    ```
    diff --git 
a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/ShellAbstractTool.java
 
b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/ShellAbstractTool.java
    index de94c98..d641478 100644
    --- 
a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/ShellAbstractTool.java
    +++ 
b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/ShellAbstractTool.java
    @@ -428,7 +428,8 @@ public abstract class ShellAbstractTool implements 
ShellTool {
                 cmdParts.add(
                         //ignore error output for the case where there are no 
running processes and kill is called without arguments
                         "ps aux | grep \"tail -c\" | grep \""+stdoutPath+"\" | 
grep -v grep | awk '{ printf $2 }' | xargs kill 2> /dev/null",
    -                    "ps aux | grep \"tail -c\" | grep \""+stderrPath+"\" | 
grep -v grep | awk '{ printf $2 }' | xargs kill 2> /dev/null");
    +                    "ps aux | grep \"tail -c\" | grep \""+stderrPath+"\" | 
grep -v grep | awk '{ printf $2 }' | xargs kill 2> /dev/null",
    +                    "exit 0");
    ```
    
    It looks like the `ShellAction`'s behaviour has changed: if there is not an 
explicit exit, then the it does not return (so we don't get any exit code). 
This shouldn't impact any Brooklyn entities, because they all use 
`SshjTool.execScript()`, which uploads the commands as a file and then executes 
it (always including a return statement). The reason brooklyn does that is that 
`ShellAction` had serious problems if buffers filled up (e.g. because the 
command was too big).


---
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.
---

Reply via email to