You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2014/03/01 00:37:44 UTC

[24/33] git commit: updated refs/heads/master to 90262a8

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/master
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());
     }