Commit 90017904 authored by Sebastian Gebhard's avatar Sebastian Gebhard Committed by Klaus Aehlig
Browse files

Set default OVS in cluster init



This commit adds functionality to gnt_cluster to set the default
master-netdev for openvswitch, when openvswitch mode is configured,
instead of DEFAULT_BRIDGE.
Signed-off-by: default avatarSebastian Gebhard <sege@fs.ei.tum.de>
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent d8819d84
......@@ -121,7 +121,13 @@ def InitCluster(opts, args):
master_netdev = opts.master_netdev
if master_netdev is None:
master_netdev = constants.DEFAULT_BRIDGE
if not opts.nicparams[constants.NIC_MODE]:
# default case, use bridging
master_netdev = constants.DEFAULT_BRIDGE
elif opts.nicparams[constants.NIC_MODE] == constants.NIC_MODE_OVS:
# default ovs is different from default bridge
master_netdev = constants.DEFAULT_OVS
opts.nicparams[constants.NIC_LINK] = constants.DEFAULT_OVS
hvlist = opts.enabled_hypervisors
if hvlist is None:
......
......@@ -719,6 +719,7 @@ MAX_TAGS_PER_OBJ = 4096
# others
DEFAULT_BRIDGE = "xen-br0"
DEFAULT_OVS = "switch1"
CLASSIC_DRBD_SYNC_SPEED = 60 * 1024 # 60 MiB, expressed in KiB
IP4_ADDRESS_LOCALHOST = "127.0.0.1"
IP4_ADDRESS_ANY = "0.0.0.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment