You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/10/24 20:30:43 UTC
[05/50] [abbrv] git commit: updated refs/heads/ui-restyle to 500c798
CLOUDSTACK-4911 [Mixed Hypervisor] VM Status is marked as alive when exit status of ping command is not available within command timeout
Supplementing the fix/commit 748315620bbbc472652e38df960d136beee4882e
While remote executing commands through ssh, wait for channel condition of EXIT_STATUS.
Signed-off-by: Sateesh Chodapuneedi <sa...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/00e57c07
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/00e57c07
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/00e57c07
Branch: refs/heads/ui-restyle
Commit: 00e57c07139493bea5ce377c05ac89543951ea7d
Parents: d4072c6
Author: Sateesh Chodapuneedi <sa...@apache.org>
Authored: Wed Oct 23 08:51:43 2013 +0530
Committer: Sateesh Chodapuneedi <sa...@apache.org>
Committed: Wed Oct 23 08:51:43 2013 +0530
----------------------------------------------------------------------
utils/src/com/cloud/utils/ssh/SshHelper.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/00e57c07/utils/src/com/cloud/utils/ssh/SshHelper.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/ssh/SshHelper.java b/utils/src/com/cloud/utils/ssh/SshHelper.java
index 667b3e3..84d8bc8 100755
--- a/utils/src/com/cloud/utils/ssh/SshHelper.java
+++ b/utils/src/com/cloud/utils/ssh/SshHelper.java
@@ -157,7 +157,7 @@ public class SshHelper {
int currentReadBytes = 0;
while (true) {
if ((stdout.available() == 0) && (stderr.available() == 0)) {
- int conditions = sess.waitForCondition(ChannelCondition.STDOUT_DATA | ChannelCondition.STDERR_DATA | ChannelCondition.EOF,
+ int conditions = sess.waitForCondition(ChannelCondition.STDOUT_DATA | ChannelCondition.STDERR_DATA | ChannelCondition.EOF | ChannelCondition.EXIT_STATUS,
waitResultTimeoutInMs);
if ((conditions & ChannelCondition.TIMEOUT) != 0) {
@@ -166,7 +166,7 @@ public class SshHelper {
throw new Exception(msg);
}
- if ((conditions & ChannelCondition.EOF) != 0) {
+ if ((conditions & ChannelCondition.EXIT_STATUS) != 0) {
if ((conditions & (ChannelCondition.STDOUT_DATA | ChannelCondition.STDERR_DATA)) == 0) {
break;
}