You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2014/09/28 11:40:19 UTC

[19/50] [abbrv] git commit: updated refs/heads/statscollector-graphite to 621156c

CLOUDSTACK-7598: When a vm deployed by cloudstack is stopped on the hypervisor
(outside cloudstack), the state of the vm is not updated in cloudstack db. The
ping task was not checking for resource (host) status by default. The power
state of the vms is returned as part of the resource status. Fixed the issue by
making sure ping task atleast tries once to get the resource status.


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

Branch: refs/heads/statscollector-graphite
Commit: 55b4ead49594212ba55bfcf7007b0cae11bf68ba
Parents: f3252db
Author: Devdeep Singh <de...@gmail.com>
Authored: Thu Sep 25 13:10:12 2014 +0530
Committer: Devdeep Singh <de...@gmail.com>
Committed: Thu Sep 25 13:13:56 2014 +0530

----------------------------------------------------------------------
 .../src/com/cloud/agent/manager/DirectAgentAttache.java        | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/55b4ead4/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java b/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java
index 9cf643f..f39bf1d 100755
--- a/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java
+++ b/engine/orchestration/src/com/cloud/agent/manager/DirectAgentAttache.java
@@ -166,11 +166,13 @@ public class DirectAgentAttache extends AgentAttache {
                 if (resource != null) {
                     PingCommand cmd = null;
                     int retried = 0;
-                    while ( cmd == null && ++retried < _HostPingRetryCount.value())
+                    cmd = resource.getCurrentStatus(_id);
+                    while (cmd == null && retried++ < _HostPingRetryCount.value())
                     {
-                        cmd = resource.getCurrentStatus(_id);
                         Thread.sleep(1000*_HostPingRetryTimer.value());
+                        cmd = resource.getCurrentStatus(_id);
                     }
+
                     if (cmd == null) {
                         s_logger.warn("Unable to get current status on " + _id + "(" + _name + ")");
                         return;