CLOUDSTACK-4659: Vmware allows destroying VM that has pending tasks, worker VM 
GC actually relies on the assumption that Vmware is protected from that which 
is a false assumption. Recycle Worker VM only it is from previous session


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/08c3b659
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/08c3b659
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/08c3b659

Branch: refs/heads/ui-restyle
Commit: 08c3b6596d4fa05385d10f7d035e3afec51451bc
Parents: 159d798
Author: Kelven Yang <kelv...@gmail.com>
Authored: Fri Sep 20 10:59:06 2013 -0700
Committer: Kelven Yang <kelv...@gmail.com>
Committed: Fri Sep 27 15:57:02 2013 -0700

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08c3b659/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
index 2649452..211f668 100755
--- 
a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
+++ 
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java
@@ -575,12 +575,16 @@ public class VmwareManagerImpl extends ManagerBase 
implements VmwareManager, Vmw
                        s_logger.info("Worker VM's owner management server has 
changed runid, recycle it");
                return true;
         }
-       
+  
+        // disable time-out check until we have found out a VMware API that 
can check if
+        // there are pending tasks on the subject VM
+/*        
         if(System.currentTimeMillis() - startTick > _hungWorkerTimeout) {
                if(s_logger.isInfoEnabled())
                        s_logger.info("Worker VM expired, seconds elapsed: " + 
(System.currentTimeMillis() - startTick) / 1000);
                return true;
         }
+*/        
        return false;
     }
 

Reply via email to