cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [1/3] git commit: updated refs/heads/master to 63688e7
Date Mon, 13 Jul 2015 14:59:58 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 5a8648f95 -> 63688e70a


kvm: Add more verbose logging about what is happening with Libvirt connections


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

Branch: refs/heads/master
Commit: 7c37ba73a32886a599474b2e4db1facd4618beff
Parents: 5a8648f
Author: Wido den Hollander <wido@42on.com>
Authored: Mon Jul 13 16:21:41 2015 +0200
Committer: Wido den Hollander <wido@42on.com>
Committed: Mon Jul 13 16:21:41 2015 +0200

----------------------------------------------------------------------
 .../cloud/hypervisor/kvm/resource/LibvirtConnection.java  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7c37ba73/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
index 1ebf936..c70a72f 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java
@@ -38,16 +38,20 @@ public class LibvirtConnection {
     }
 
     static public Connect getConnection(String hypervisorURI) throws LibvirtException {
+        s_logger.debug("Looking for libvirtd connection at: " + hypervisorURI);
         Connect conn = s_connections.get(hypervisorURI);
 
         if (conn == null) {
+            s_logger.info("No existing libvirtd connection found. Opening a new one");
             conn = new Connect(hypervisorURI, false);
+            s_logger.debug("Successfully connected to libvirt at: " + hypervisorURI);
             s_connections.put(hypervisorURI, conn);
         } else {
             try {
                 conn.getVersion();
             } catch (LibvirtException e) {
-                s_logger.debug("Connection with libvirtd is broken, due to " + e.getMessage());
+                s_logger.error("Connection with libvirtd is broken: " + e.getMessage());
+                s_logger.debug("Opening a new libvirtd connection to: " + hypervisorURI);
                 conn = new Connect(hypervisorURI, false);
                 s_connections.put(hypervisorURI, conn);
             }
@@ -66,11 +70,11 @@ public class LibvirtConnection {
                     return conn;
                 }
             } catch (Exception e) {
-                s_logger.debug("can't find connection: " + hypervisor.toString() + ", for
vm: " + vmName + ", continue");
+                s_logger.debug("Can not find " + hypervisor.toString() + " connection for
Instance: " + vmName + ", continuing.");
             }
         }
 
-        s_logger.debug("can't find which hypervisor the vm used , then use the default hypervisor");
+        s_logger.warn("Can not find a connection for Instance " + vmName + ". Assuming the
default connection.");
         // return the default connection
         return getConnection();
     }


Mime
View raw message