mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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 <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
f8b7251b88
commit
e1db982d6b
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user