You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2014/03/06 23:06:45 UTC
[02/50] [abbrv] git commit: updated refs/heads/rbac to 48e08fe
Let ESX host timeout to reflect disconnect status in vCenter into CloudStack.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/57a00a81
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/57a00a81
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/57a00a81
Branch: refs/heads/rbac
Commit: 57a00a8172b26ffcc11eae353cc16cba7329eee4
Parents: 24e64ac
Author: Kelven Yang <ke...@gmail.com>
Authored: Thu Feb 20 17:21:57 2014 -0800
Committer: Kelven Yang <ke...@gmail.com>
Committed: Fri Feb 28 15:35:59 2014 -0800
----------------------------------------------------------------------
.../cloud/hypervisor/vmware/resource/VmwareResource.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/57a00a81/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 89947df..3eac0fc 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -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());
}