airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [1/2] git commit: removing session.disconnect during error because we maintain session in static level
Date Fri, 03 Oct 2014 20:06:04 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 2b0b6a272 -> 650933484


removing session.disconnect during error because we maintain session in static level


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/42fee53e
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/42fee53e
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/42fee53e

Branch: refs/heads/master
Commit: 42fee53eb8cc956480a0fc6888ccf720020a2dc9
Parents: 1ef608c
Author: lahiru <lahiru@apache.org>
Authored: Fri Oct 3 16:05:00 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Fri Oct 3 16:05:00 2014 -0400

----------------------------------------------------------------------
 .../org/apache/airavata/gsi/ssh/api/CommandExecutor.java  | 10 +++++-----
 .../airavata/gsi/ssh/impl/GSISSHAbstractCluster.java      |  2 +-
 .../java/org/apache/airavata/gsi/ssh/util/SSHUtils.java   |  9 ++++-----
 3 files changed, 10 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/42fee53e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
index 070e718..d26ca06 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/CommandExecutor.java
@@ -64,7 +64,7 @@ public class CommandExecutor {
             channel = session.openChannel("exec");
             ((ChannelExec) channel).setCommand(command);
         } catch (JSchException e) {
-            session.disconnect();
+//            session.disconnect();
 
             throw new SSHApiException("Unable to execute command - ", e);
         }
@@ -76,7 +76,7 @@ public class CommandExecutor {
         } catch (JSchException e) {
 
             channel.disconnect();
-            session.disconnect();
+//            session.disconnect();
             throw new SSHApiException("Unable to retrieve command output. Command - " + command,
e);
         }
 
@@ -237,7 +237,7 @@ public class CommandExecutor {
             channel = session.openChannel("exec");
             ((ChannelExec) channel).setCommand(command);
         } catch (JSchException e) {
-            session.disconnect();
+//            session.disconnect();
 
             throw new SSHApiException("Unable to execute command - " + command +
                     " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
@@ -254,7 +254,7 @@ public class CommandExecutor {
         } catch (JSchException e) {
 
             channel.disconnect();
-            session.disconnect();
+//            session.disconnect();
 
             throw new SSHApiException("Unable to retrieve command output. Command - " + command
+
                     " on server - " + serverInfo.getHost() + ":" + serverInfo.getPort() +
@@ -265,7 +265,7 @@ public class CommandExecutor {
         commandOutput.onOutput(channel);
 
         channel.disconnect();
-        session.disconnect();
+//        session.disconnect();
     }
 
     private static void logDebug(String message) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/42fee53e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
index b5e0802..ee4c0cb 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -601,6 +601,6 @@ public class GSISSHAbstractCluster implements Cluster {
     }
 
     public void disconnect() throws SSHApiException {
-        getSession().disconnect();
+//        getSession().disconnect();
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/42fee53e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
index 20bd042..9cafde6 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/util/SSHUtils.java
@@ -213,7 +213,6 @@ public class SSHUtils {
             throw new SSHApiException(stdOutReader.getStdErrorString());
         }
         channel.disconnect();
-        session.disconnect();
     }
 
     /**
@@ -567,7 +566,7 @@ public class SSHUtils {
                 out.flush();
             }
 
-            session.disconnect();
+//            session.disconnect();
 
             stdOutReader.onOutput(channel);
             if (stdOutReader.getStdErrorString().contains("scp:")) {
@@ -715,8 +714,8 @@ public class SSHUtils {
             channel.connect();
         } catch (JSchException e) {
 
-            channel.disconnect();
-            session.disconnect();
+//            channel.disconnect();
+//            session.disconnect();
 
             throw new SSHApiException("Unable to retrieve command output. Command - " + command
+
                     " on server - " + session.getHost() + ":" + session.getPort() +
@@ -747,7 +746,7 @@ public class SSHUtils {
         } catch (JSchException e) {
 
             channel.disconnect();
-            session.disconnect();
+//            session.disconnect();
 
             throw new SSHApiException("Unable to retrieve command output. Command - " + command
+
                     " on server - " + session.getHost() + ":" + session.getPort() +


Mime
View raw message