You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2022/08/02 17:32:58 UTC

[brooklyn-server] 04/06: downgrade messages to trace

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git

commit aa69987c77d978fdd7c2f232b885d4e1527964cd
Author: Alex Heneveld <al...@cloudsoft.io>
AuthorDate: Tue Aug 2 13:55:59 2022 +0100

    downgrade messages to trace
---
 .../org/apache/brooklyn/util/core/internal/ssh/sshj/SshjTool.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjTool.java b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjTool.java
index f953286ea5..06a9579df8 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjTool.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/internal/ssh/sshj/SshjTool.java
@@ -991,10 +991,10 @@ public class SshjTool extends SshAbstractTool implements SshTool {
                 closeWhispering(output, this);
 
                 boolean timedOut = false;
+                Exception last = null;
                 try {
                     long timeoutMillis = Math.min(timeout.toMilliseconds(), Integer.MAX_VALUE);
                     long timeoutEnd = System.currentTimeMillis() + timeoutMillis;
-                    Exception last = null;
                     do {
                         if (!shell.isOpen() && ((SessionChannel)session).getExitStatus()!=null)
                             // shell closed, and exit status returned
@@ -1015,8 +1015,8 @@ public class SshjTool extends SshAbstractTool implements SshTool {
                                 // don't automatically give up here, it might be a transient network failure
                                 last = e;
                             }
+                            LOG.trace("SshjTool threw exception joining shell (timeouts are normal)", e);
                         }
-                        LOG.info("SshjTool looping waiting for shell; thread "+Thread.currentThread()+" interrupted? "+Thread.currentThread().isInterrupted());
                         if (endBecauseReturned) {
                             // shell is still open, ie some process is running
                             // but we have a result code, so main shell is finished
@@ -1036,6 +1036,7 @@ public class SshjTool extends SshAbstractTool implements SshTool {
                     }
                     return ((SessionChannel)session).getExitStatus();
                 } finally {
+                    LOG.trace("SshjTool shell join completed", last);
                     // wait for all stdout/stderr to have been re-directed
                     closeWhispering(shell, this);
                     shell = null;