mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Make sure to let VM question answer monitor exit gracefully
This commit is contained in:
parent
4a414d3990
commit
e051490cea
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user