cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: updated refs/heads/4.2 to 016fe3e
Date Tue, 06 Aug 2013 21:44:38 GMT
Updated Branches:
  refs/heads/4.2 4d43fe13c -> 016fe3ecb


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


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

Branch: refs/heads/4.2
Commit: 016fe3ecb8efe5c5b441cd531d6e32159c571ef3
Parents: 4d43fe1
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Aug 6 15:41:21 2013 -0600
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Aug 6 15:44:23 2013 -0600

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/resource/LibvirtComputingResource.java  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/016fe3ec/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 2ae21ad..6355743 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -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) {


Mime
View raw message