Merge "os_vif: Add support for configuring os_vif_ovs plugin"
This commit is contained in:
commit
2e559c7dfb
29
lib/os-vif
Normal file
29
lib/os-vif
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# support vsctl or native.
|
||||||
|
# until bug #1929446 is resolved we override the os-vif default
|
||||||
|
# and fall back to the legacy "vsctl" driver.
|
||||||
|
OS_VIF_OVS_OVSDB_INTERFACE=${OS_VIF_OVS_OVSDB_INTERFACE:="vsctl"}
|
||||||
|
|
||||||
|
function is_ml2_ovs {
|
||||||
|
if [[ "${Q_AGENT}" == "openvswitch" ]]; then
|
||||||
|
echo "True"
|
||||||
|
fi
|
||||||
|
echo "False"
|
||||||
|
}
|
||||||
|
|
||||||
|
# This should be true for any ml2/ovs job but should be set to false for
|
||||||
|
# all other ovs based jobs e.g. ml2/ovn
|
||||||
|
OS_VIF_OVS_ISOLATE_VIF=${OS_VIF_OVS_ISOLATE_VIF:=$(is_ml2_ovs)}
|
||||||
|
OS_VIF_OVS_ISOLATE_VIF=$(trueorfalse False OS_VIF_OVS_ISOLATE_VIF)
|
||||||
|
|
||||||
|
function configure_os_vif {
|
||||||
|
if [[ -e ${NOVA_CONF} ]]; then
|
||||||
|
iniset ${NOVA_CONF} os_vif_ovs ovsdb_interface ${OS_VIF_OVS_OVSDB_INTERFACE}
|
||||||
|
iniset ${NOVA_CONF} os_vif_ovs isolate_vif ${OS_VIF_OVS_ISOLATE_VIF}
|
||||||
|
fi
|
||||||
|
if [[ -e ${NEUTRON_CONF} ]]; then
|
||||||
|
iniset ${NEUTRON_CONF} os_vif_ovs ovsdb_interface ${OS_VIF_OVS_OVSDB_INTERFACE}
|
||||||
|
iniset ${NEUTRON_CONF} os_vif_ovs isolate_vif ${OS_VIF_OVS_ISOLATE_VIF}
|
||||||
|
fi
|
||||||
|
}
|
6
stack.sh
6
stack.sh
@ -597,6 +597,7 @@ source $TOP_DIR/lib/ldap
|
|||||||
source $TOP_DIR/lib/dstat
|
source $TOP_DIR/lib/dstat
|
||||||
source $TOP_DIR/lib/tcpdump
|
source $TOP_DIR/lib/tcpdump
|
||||||
source $TOP_DIR/lib/etcd3
|
source $TOP_DIR/lib/etcd3
|
||||||
|
source $TOP_DIR/lib/os-vif
|
||||||
|
|
||||||
# Extras Source
|
# Extras Source
|
||||||
# --------------
|
# --------------
|
||||||
@ -1159,6 +1160,11 @@ if is_service_enabled q-dhcp; then
|
|||||||
sudo sysctl -w net.ipv4.ip_forward=1
|
sudo sysctl -w net.ipv4.ip_forward=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# os-vif
|
||||||
|
# ------
|
||||||
|
if is_service_enabled nova neutron; then
|
||||||
|
configure_os_vif
|
||||||
|
fi
|
||||||
|
|
||||||
# Storage Service
|
# Storage Service
|
||||||
# ---------------
|
# ---------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user