Let ESX host timeout to reflect disconnect status in vCenter into CloudStack.

This commit is contained in:
Kelven Yang 2014-02-20 17:21:57 -08:00
parent 24e64ac62a
commit 57a00a8172
1 changed files with 11 additions and 0 deletions

View File

@ -4671,6 +4671,17 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
if (newStates == null) {
return null;
}
VmwareContext context = getServiceContext();
VmwareHypervisorHost hyperHost = getHyperHost(context);
try {
if (!hyperHost.isHyperHostConnected()) {
return null;
}
} catch (Exception e) {
s_logger.error("Unexpected exception", e);
return null;
}
return new PingRoutingCommand(getType(), id, newStates, syncHostVmStates());
}