You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/04/29 16:51:41 UTC

[3/6] git commit: updated refs/heads/4.5 to 031d7a9

CLOUDSTACK-8410. ESXi host stuck disconnects frequently.
During ping task, while scanning and updating status of all VMs on the host that are stuck in a transitional state
and are missing from the power report, do so only for VMs that are not removed.

(cherry picked from commit de7173a0ed6434d1809d0471fe8f28bd339f208e)
Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/4.5
Commit: e1db982d6b46f81240ef47ed2f6604e38d69c17a
Parents: f8b7251
Author: Likitha Shetty <li...@citrix.com>
Authored: Fri Mar 13 15:14:25 2015 +0530
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Wed Apr 29 16:50:40 2015 +0200

----------------------------------------------------------------------
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java         | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e1db982d/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 3cf8c2d..36c5c44 100755
--- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -3817,7 +3817,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
         String sql = "SELECT i.* FROM vm_instance as i, host as h WHERE h.status = 'UP' " +
                 "AND h.id = ? AND i.power_state_update_time < ? AND i.host_id = h.id " +
                 "AND (i.state ='Starting' OR i.state='Stopping' OR i.state='Migrating') " +
-                "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)";
+                "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)" +
+                "AND i.removed IS NULL";
 
         List<Long> l = new ArrayList<Long>();
         TransactionLegacy txn = null;
@@ -3851,7 +3852,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
         String sql = "SELECT i.* FROM vm_instance as i, host as h WHERE h.status = 'UP' " +
                 "AND h.id = ? AND i.power_state_update_time > ? AND i.host_id = h.id " +
                 "AND (i.state ='Starting' OR i.state='Stopping' OR i.state='Migrating') " +
-                "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)";
+                "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)" +
+                "AND i.removed IS NULL";
 
         List<Long> l = new ArrayList<Long>();
         TransactionLegacy txn = null;
@@ -3882,7 +3884,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
         String sql = "SELECT i.* FROM vm_instance as i, host as h WHERE h.status != 'UP' " +
                 "AND i.power_state_update_time < ? AND i.host_id = h.id " +
                 "AND (i.state ='Starting' OR i.state='Stopping' OR i.state='Migrating') " +
-                "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)";
+                "AND i.id NOT IN (SELECT w.vm_instance_id FROM vm_work_job AS w JOIN async_job AS j ON w.id = j.id WHERE j.job_status = ?)" +
+                "AND i.removed IS NULL";
 
         List<Long> l = new ArrayList<Long>();
         TransactionLegacy txn = null;