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.
This commit is contained in:
parent
f45e6b94ed
commit
de7173a0ed
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user