Bug 13895 - OVM zone z1 hosts went to Alert state, VMs in stopped state and stopping state

mark VM as stopped when can not get its details
reviewed-by: edison
This commit is contained in:
frank 2012-02-21 14:56:25 -08:00
parent f2826af1ae
commit c71f22cdfc

View File

@ -695,7 +695,14 @@ public class OvmResourceBase implements ServerResource, HypervisorResource {
}
try {
OvmVm.Details vm = OvmVm.getDetails(_conn, vmName);
OvmVm.Details vm = null;
try {
vm = OvmVm.getDetails(_conn, vmName);
} catch (XmlRpcException e) {
s_logger.debug("Unable to get details of vm: " + vmName + ", treating it as stopped", e);
return new StopAnswer(cmd, "success", 0, 0L, 0L);
}
deleteAllNetworkRulesForVm(vmName);
OvmVm.stop(_conn, vmName);
cleanup(vm);