Skip to content

Commit 57a00a8

Browse files
committed
Let ESX host timeout to reflect disconnect status in vCenter into CloudStack.
1 parent 24e64ac commit 57a00a8

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4671,6 +4671,17 @@ public PingCommand getCurrentStatus(long id) {
46714671
if (newStates == null) {
46724672
return null;
46734673
}
4674+
4675+
VmwareContext context = getServiceContext();
4676+
VmwareHypervisorHost hyperHost = getHyperHost(context);
4677+
try {
4678+
if (!hyperHost.isHyperHostConnected()) {
4679+
return null;
4680+
}
4681+
} catch (Exception e) {
4682+
s_logger.error("Unexpected exception", e);
4683+
return null;
4684+
}
46744685
return new PingRoutingCommand(getType(), id, newStates, syncHostVmStates());
46754686
}
46764687

0 commit comments

Comments
 (0)