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/master to e574186
Date Tue, 06 Aug 2013 21:46:47 GMT
Updated Branches:
  refs/heads/master aebc43747 -> e5741863f


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/e5741863
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e5741863
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e5741863

Branch: refs/heads/master
Commit: e5741863f7a29d8165e01394652461ee25d2ecfe
Parents: aebc437
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:46:36 2013 -0600

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5741863/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 4e3bf10..5517054 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
@@ -4362,6 +4362,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