mirror of https://github.com/apache/cloudstack.git
Pragrammatically Answer HA question posted in vCenter since it will block CloudStack from continuously operating on the VM
This commit is contained in:
parent
fa7d9ad1a8
commit
6987f23380
|
|
@ -248,17 +248,12 @@ public class VirtualMachineMO extends BaseMO {
|
|||
}
|
||||
});
|
||||
|
||||
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;
|
||||
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));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue