Repository: cloudstack Updated Branches: refs/heads/master f45e6b94e -> de7173a0e
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. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/de7173a0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/de7173a0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/de7173a0 Branch: refs/heads/master Commit: de7173a0ed6434d1809d0471fe8f28bd339f208e Parents: f45e6b9 Author: Likitha Shetty <likitha.she...@citrix.com> Authored: Fri Mar 13 15:14:25 2015 +0530 Committer: Sanjay Tripathi <sanjay.tripa...@citrix.com> Committed: Tue Apr 28 09:15:22 2015 +0530 ---------------------------------------------------------------------- .../src/com/cloud/vm/VirtualMachineManagerImpl.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/de7173a0/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 f6280c2..527b623 100644 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -3837,7 +3837,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final 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"; final List<Long> l = new ArrayList<Long>(); TransactionLegacy txn = null; @@ -3872,7 +3873,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final 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"; final List<Long> l = new ArrayList<Long>(); TransactionLegacy txn = null; @@ -3904,7 +3906,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final 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"; final List<Long> l = new ArrayList<Long>(); TransactionLegacy txn = null;