cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject git commit: updated refs/heads/master to 322db71
Date Sun, 26 May 2013 09:42:21 GMT
Updated Branches:
  refs/heads/master 5b902c700 -> 322db71ee


agent: Only probe running VMs for the current Hypervisor Type

Otherwise we try to probe for LXC VMs on a KVM hypervisor and vise versa.


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

Branch: refs/heads/master
Commit: 322db71eedb6b52fca6f92b46b613607083c4d88
Parents: 5b902c7
Author: Wido den Hollander <wido@42on.com>
Authored: Sun May 26 11:38:00 2013 +0200
Committer: Wido den Hollander <wido@42on.com>
Committed: Sun May 26 11:38:41 2013 +0200

----------------------------------------------------------------------
 agent/conf/agent.properties                        |    5 +++
 .../kvm/resource/LibvirtComputingResource.java     |   24 ++++++++------
 2 files changed, 19 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/322db71e/agent/conf/agent.properties
----------------------------------------------------------------------
diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties
index 7dc4ba8..60030ae 100644
--- a/agent/conf/agent.properties
+++ b/agent/conf/agent.properties
@@ -84,6 +84,11 @@ domr.scripts.dir=scripts/network/domr/kvm
 # set the hypervisor type, values are: kvm, lxc
 # hypervisor.type=kvm
 
+# set the hypervisor URI. Usually there is no need for changing this
+# For KVM: qemu:///system
+# For LXC: lxc:///
+# hypervisor.uri=qemu:///system
+
 # settings to enable direct networking in libvirt, should not be used
 # on hosts that run system vms, values for mode are: private, bridge, vepa
 # libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/322db71e/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 c34d1eb..f979cfe 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
@@ -3943,18 +3943,22 @@ ServerResource {
         final HashMap<String, State> vmStates = new HashMap<String, State>();
         Connect conn = null;
 
-        try {
-            conn = LibvirtConnection.getConnectionByType(HypervisorType.LXC.toString());
-            vmStates.putAll(getAllVms(conn));
-        } catch (LibvirtException e) {
-            s_logger.debug("Failed to get connection: " + e.getMessage());
+        if (_hypervisorType == HypervisorType.LXC) {
+            try {
+                conn = LibvirtConnection.getConnectionByType(HypervisorType.LXC.toString());
+                vmStates.putAll(getAllVms(conn));
+            } catch (LibvirtException e) {
+                s_logger.debug("Failed to get connection: " + e.getMessage());
+            }
         }
 
-        try {
-            conn = LibvirtConnection.getConnectionByType(HypervisorType.KVM.toString());
-            vmStates.putAll(getAllVms(conn));
-        } catch (LibvirtException e) {
-            s_logger.debug("Failed to get connection: " + e.getMessage());
+        if (_hypervisorType == HypervisorType.KVM) {
+            try {
+                conn = LibvirtConnection.getConnectionByType(HypervisorType.KVM.toString());
+                vmStates.putAll(getAllVms(conn));
+            } catch (LibvirtException e) {
+                s_logger.debug("Failed to get connection: " + e.getMessage());
+            }
         }
 
         return vmStates;


Mime
View raw message