mirror of https://github.com/apache/cloudstack.git
Summary: Quiet erroneous stopVM failures on kvm
Detail: Cloudstack tries to stop VMs all the time, for all sorts of reasons, but usually just to get into a known state. Libvirt throws an exception of 'Domain not found' when attempting to stop a VM that doesn't exist. This causes problems for troubleshooting real issues. Domain not found should equate to success if trying to stop. BUG-ID: CLOUDSTACK-4011 Bugfix-for: 4.2 Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1375825281 -0600
This commit is contained in:
parent
4d43fe13ce
commit
016fe3ecb8
|
|
@ -4365,6 +4365,10 @@ ServerResource {
|
|||
}
|
||||
}
|
||||
} catch (LibvirtException e) {
|
||||
if (e.getMessage().contains("Domain not found")) {
|
||||
s_logger.debug("VM " + vmName + " doesn't exist, no need to stop it");
|
||||
return null;
|
||||
}
|
||||
s_logger.debug("Failed to stop VM :" + vmName + " :", e);
|
||||
return e.getMessage();
|
||||
} catch (InterruptedException ie) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue