You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by re...@apache.org on 2016/01/16 19:47:23 UTC

[1/2] git commit: updated refs/heads/4.7 to 450db8c

Repository: cloudstack
Updated Branches:
  refs/heads/4.7 66a933afa -> 450db8c6c


CLOUDSTACK-9202 Bump ssh timeout

It seems the VR needs more time for some of its commands. Until we figured
out the root cause, this allows the VRs to start again.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1c5e899a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1c5e899a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1c5e899a

Branch: refs/heads/4.7
Commit: 1c5e899a2d727d8512a28da76a5e49c9d762d295
Parents: 9be76b3
Author: Remi Bergsma <gi...@remi.nl>
Authored: Mon Dec 28 15:54:26 2015 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Mon Dec 28 15:54:26 2015 +0100

----------------------------------------------------------------------
 utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java | 4 +++-
 utils/src/main/java/com/cloud/utils/ssh/SshHelper.java    | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c5e899a/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java b/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java
index e35a3ea..61d01c4 100644
--- a/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java
+++ b/utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java
@@ -29,6 +29,8 @@ import com.trilead.ssh2.Session;
 
 public class SSHCmdHelper {
     private static final Logger s_logger = Logger.getLogger(SSHCmdHelper.class);
+    private static final int DEFAULT_CONNECT_TIMEOUT = 180000;
+    private static final int DEFAULT_KEX_TIMEOUT = 60000;
 
     public static com.trilead.ssh2.Connection acquireAuthorizedConnection(String ip, String username, String password) {
         return acquireAuthorizedConnection(ip, 22, username, password);
@@ -37,7 +39,7 @@ public class SSHCmdHelper {
     public static com.trilead.ssh2.Connection acquireAuthorizedConnection(String ip, int port, String username, String password) {
         com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(ip, port);
         try {
-            sshConnection.connect(null, 60000, 60000);
+            sshConnection.connect(null, DEFAULT_CONNECT_TIMEOUT, DEFAULT_KEX_TIMEOUT);
             if (!sshConnection.authenticateWithPassword(username, password)) {
                 String[] methods = sshConnection.getRemainingAuthMethods(username);
                 StringBuffer mStr = new StringBuffer();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c5e899a/utils/src/main/java/com/cloud/utils/ssh/SshHelper.java
----------------------------------------------------------------------
diff --git a/utils/src/main/java/com/cloud/utils/ssh/SshHelper.java b/utils/src/main/java/com/cloud/utils/ssh/SshHelper.java
index 3aac427..d3c88c8 100644
--- a/utils/src/main/java/com/cloud/utils/ssh/SshHelper.java
+++ b/utils/src/main/java/com/cloud/utils/ssh/SshHelper.java
@@ -29,14 +29,14 @@ import com.trilead.ssh2.ChannelCondition;
 import com.cloud.utils.Pair;
 
 public class SshHelper {
-    private static final int DEFAULT_CONNECT_TIMEOUT = 60000;
+    private static final int DEFAULT_CONNECT_TIMEOUT = 180000;
     private static final int DEFAULT_KEX_TIMEOUT = 60000;
 
     private static final Logger s_logger = Logger.getLogger(SshHelper.class);
 
     public static Pair<Boolean, String> sshExecute(String host, int port, String user, File pemKeyFile, String password, String command) throws Exception {
 
-        return sshExecute(host, port, user, pemKeyFile, password, command, 60000, 60000, 120000);
+        return sshExecute(host, port, user, pemKeyFile, password, command, DEFAULT_CONNECT_TIMEOUT, DEFAULT_KEX_TIMEOUT, 120000);
     }
 
     public static void scpTo(String host, int port, String user, File pemKeyFile, String password, String remoteTargetDirectory, String localFile, String fileMode)


[2/2] git commit: updated refs/heads/4.7 to 450db8c

Posted by re...@apache.org.
Merge pull request #1291 from remibergsma/bump-ssh-timeout

CLOUDSTACK-9202 Bump ssh timeout for VR commandsIt seems the VR needs more time for some of its commands. Until we figured out the root cause, this allows the VRs to start again.

Error seen:
```
2015-12-28 14:35:18,201 ERROR [c.c.n.r.VirtualNetworkApplianceManagerImpl] (Work-Job-Executor-1:ctx-34ff7f80 job-39723/job-39726 ctx-d63de41b) Timed out in waiting SSH execution result
2015-12-28 14:35:18,201 WARN [c.c.n.r.VirtualNetworkApplianceManagerImpl] (Work-Job-Executor-1:ctx-34ff7f80 job-39723/job-39726 ctx-d63de41b) Command: com.cloud.agent.api.Command failed while starting virtua
l router
2015-12-28 14:35:18,201 INFO [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-1:ctx-34ff7f80 job-39723/job-39726 ctx-d63de41b) The guru did not like the answers so stopping VM[DomainRouter|r-1534-VM]
.Answer":{"result":true,"wait":0}},{"com.cloud.agent.api.Answer":{"result":false,"details":"Timed out in waiting SSH execution result","wait":0}}] }
```

* pr/1291:
  CLOUDSTACK-9202 Bump ssh timeout

Signed-off-by: Remi Bergsma <gi...@remi.nl>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/450db8c6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/450db8c6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/450db8c6

Branch: refs/heads/4.7
Commit: 450db8c6cd5133c68b00ffa925db9c90fd6cfcf7
Parents: 66a933a 1c5e899
Author: Remi Bergsma <gi...@remi.nl>
Authored: Sat Jan 16 19:47:00 2016 +0100
Committer: Remi Bergsma <gi...@remi.nl>
Committed: Sat Jan 16 19:47:01 2016 +0100

----------------------------------------------------------------------
 utils/src/main/java/com/cloud/utils/ssh/SSHCmdHelper.java | 4 +++-
 utils/src/main/java/com/cloud/utils/ssh/SshHelper.java    | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------