You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2013/01/23 08:15:58 UTC
[9/45] git commit: Summary: Polish and shine
Summary: Polish and shine
Document the used options in agent.properties
Default the bridge driver to something sensible based on the
configuration of the bridge type.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/11fd1216
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/11fd1216
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/11fd1216
Branch: refs/heads/master
Commit: 11fd1216edf62766be8c99e07ed421341377c74e
Parents: 32c5fed
Author: Hugo Trippaers <tr...@gmail.com>
Authored: Mon Jan 14 18:43:15 2013 +0100
Committer: Hugo Trippaers <tr...@gmail.com>
Committed: Mon Jan 14 18:43:15 2013 +0100
----------------------------------------------------------------------
agent/conf/agent.properties | 11 +++++++++++
.../kvm/resource/LibvirtComputingResource.java | 10 ++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/11fd1216/agent/conf/agent.properties
----------------------------------------------------------------------
diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties
index 27572b5..74cfd1c 100644
--- a/agent/conf/agent.properties
+++ b/agent/conf/agent.properties
@@ -69,3 +69,14 @@ domr.scripts.dir=scripts/network/domr/kvm
# set the vm migrate speed, by default, it will try to guess the speed of the guest network
# In MegaBytes per second
#vm.migrate.speed=0
+
+# set the type of bridge used on the hypervisor, this defines what commands the resource
+# will use to setup networking. Currently supported NATIVE, OPENVSWITCH
+#network.bridge.type=native
+
+# set the driver used to plug and unplug nics from the bridges
+# a sensible default will be selected based on the network.bridge.type but can
+# be overridden here.
+# native = com.cloud.hypervisor.kvm.resource.BridgeVifDriver
+# openvswitch = com.cloud.hypervisor.kvm.resource.OvsBridgeDriver
+#libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.BridgeVifDriver
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/11fd1216/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 fade750..1474d11 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
@@ -786,8 +786,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements
// Load the vif driver
String vifDriverName = (String) params.get("libvirt.vif.driver");
if (vifDriverName == null) {
- s_logger.info("No libvirt.vif.driver specififed. Defaults to BridgeVifDriver.");
- vifDriverName = "com.cloud.hypervisor.kvm.resource.BridgeVifDriver";
+ if (_bridgeType == BridgeType.OPENVSWITCH) {
+ s_logger.info("No libvirt.vif.driver specififed. Defaults to OvsVifDriver.");
+ vifDriverName = "com.cloud.hypervisor.kvm.resource.OvsVifDriver";
+ }
+ else {
+ s_logger.info("No libvirt.vif.driver specififed. Defaults to BridgeVifDriver.");
+ vifDriverName = "com.cloud.hypervisor.kvm.resource.BridgeVifDriver";
+ }
}
params.put("libvirt.computing.resource", (Object) this);