cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject [19/33] git commit: updated refs/heads/master to 90262a8
Date Fri, 28 Feb 2014 23:37:39 GMT
Make sure to let VM question answer monitor exit gracefully


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

Branch: refs/heads/master
Commit: 9f0d1cee64b0076b9d9cdbd18d38527a75dac7bb
Parents: 6987f23
Author: Kelven Yang <kelveny@gmail.com>
Authored: Mon Feb 3 14:01:10 2014 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Fri Feb 28 15:35:58 2014 -0800

----------------------------------------------------------------------
 .../hypervisor/vmware/mo/VirtualMachineMO.java     | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f0d1cee/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index 663adbf..263c656 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -248,12 +248,17 @@ public class VirtualMachineMO extends BaseMO {
             }
         });
 
-        boolean result = _context.getVimClient().waitForTask(morTask);
-        if (result) {
-            _context.waitForTaskProgressDone(morTask);
-            return true;
-        } else {
-            s_logger.error("VMware powerOnVM_Task failed due to " + TaskMO.getTaskFailureInfo(_context,
morTask));
+        try {
+            boolean result = _context.getVimClient().waitForTask(morTask);
+            if (result) {
+                _context.waitForTaskProgressDone(morTask);
+                return true;
+            } else {
+                s_logger.error("VMware powerOnVM_Task failed due to " + TaskMO.getTaskFailureInfo(_context,
morTask));
+            }
+        } finally {
+            // make sure to let VM question monitor exit
+            flags[0] = true;
         }
 
         return false;


Mime
View raw message