cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [24/33] git commit: updated refs/heads/master to 90262a8
Date Fri, 28 Feb 2014 23:37:44 GMT
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 <kelveny@gmail.com>
Authored: Thu Feb 20 17:21:57 2014 -0800
Committer: Kelven Yang <kelveny@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());
     }
 


Mime
View raw message