summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Leroy <maxime.leroy@6wind.com>2015-05-06 18:16:24 +0200
committerMaxime Leroy <maxime.leroy@6wind.com>2015-05-13 17:08:57 +0200
commitacbe6a00bb824e4b1a2449ce39176944b3b582b7 (patch)
tree74e6f1b34b41f57259ae503bee508540b960660a
parent14c4f876e94c72903a893c5044d2622eb7e4d447 (diff)
devstack: update script to configure ovs-fp
- Enable ovs-fp mechanism in the devstack settings. - Customize ml2 conf for fast path support Change-Id: If362b9fb5498cec0e161968a48f9715fd9016928
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Samuel Gauthier <samuel.gauthier@6wind.com> Workflow+1: Samuel Gauthier <samuel.gauthier@6wind.com> Submitted-by: Jenkins Submitted-at: Wed, 13 May 2015 15:34:27 +0000 Reviewed-on: https://review.openstack.org/182711 Project: stackforge/networking-6wind Branch: refs/heads/master
-rw-r--r--devstack/plugin.sh36
-rw-r--r--devstack/settings10
2 files changed, 46 insertions, 0 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index e50f5ce..64c3d1a 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -14,6 +14,9 @@
14# install_fast_path 14# install_fast_path
15# write_fast_path_conf 15# write_fast_path_conf
16# start_fast_path 16# start_fast_path
17# setup_develop networking-6wind
18# configure_nova_rootwrap
19# configure_ml2_for_fast_path
17# stop_fast_path 20# stop_fast_path
18 21
19# Save trace setting 22# Save trace setting
@@ -23,6 +26,31 @@ set +o xtrace
23NET_6WIND_DIR=$DEST/networking-6wind 26NET_6WIND_DIR=$DEST/networking-6wind
24NOVA_ROOTWRAP=$(get_rootwrap_location nova) 27NOVA_ROOTWRAP=$(get_rootwrap_location nova)
25 28
29function create_nova_rootwrap {
30 # copy 6wind.filers for vif_ovsfp_plug scripts
31 sudo cp $NET_6WIND_DIR/etc/nova/rootwrap.d/6wind.filters /etc/nova/rootwrap.d/.
32
33 # fast-path commands are install in /usr/local, so nova-rootwrap needs to
34 # be allowed to find the tools installed in /usr/local/bin.
35 iniset /etc/nova/rootwrap.conf DEFAULT exec_dirs \
36 "$(iniget /etc/nova/rootwrap.conf DEFAULT exec_dirs),/usr/local/bin"
37}
38
39function configure_ml2_for_fast_path {
40 if [[ "$Q_DISABLE_SECURITY" == "True" ]]; then
41 # disable firewall in nova
42 LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
43 iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
44 inicomment $NOVA_CONF DEFAULT security_group_api
45 # disable firewall in neutron
46 iniset /$Q_PLUGIN_CONF_FILE securitygroup enable_security_group False
47 iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver
48 elif [[ "$Q_USE_SECGROUP" == "True" ]]; then
49 iniset /$Q_PLUGIN_CONF_FILE securitygroup enable_ipset False
50 iniset $NEUTRON_CONF agent comment_iptables_rules False
51 fi
52}
53
26# main loop 54# main loop
27if is_service_enabled net-6wind; then 55if is_service_enabled net-6wind; then
28 source $NET_6WIND_DIR/devstack/libs/fast-path 56 source $NET_6WIND_DIR/devstack/libs/fast-path
@@ -33,6 +61,14 @@ if is_service_enabled net-6wind; then
33 fi 61 fi
34 write_fast_path_conf 62 write_fast_path_conf
35 start_fast_path 63 start_fast_path
64 setup_develop $DEST/networking-6wind
65 elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
66 if is_service_enabled nova; then
67 create_nova_rootwrap
68 fi
69 if is_service_enabled neutron; then
70 configure_ml2_for_fast_path
71 fi
36 fi 72 fi
37 73
38 if [[ "$1" == "unstack" ]]; then 74 if [[ "$1" == "unstack" ]]; then
diff --git a/devstack/settings b/devstack/settings
index 042e5cd..629f98f 100644
--- a/devstack/settings
+++ b/devstack/settings
@@ -1,5 +1,9 @@
1# Copyright 2015 6WIND S.A. 1# Copyright 2015 6WIND S.A.
2 2
3# use the branch under review for vif_plug_script
4NOVA_REPO=https://review.openstack.org/p/openstack/nova
5NOVA_BRANCH=refs/changes/70/162470/6
6
3# fast path settings 7# fast path settings
4FP_PKG_DIR=${FP_PKG_DIR:-$DEST/fp-delivery} 8FP_PKG_DIR=${FP_PKG_DIR:-$DEST/fp-delivery}
5FP_MASK=${FP_MASK:-0x4} 9FP_MASK=${FP_MASK:-0x4}
@@ -11,3 +15,9 @@ FP_NB_VHOSTUSER_PORTS=${FP_NB_VHOSTUSER_PORT:-20}
11 15
12# openvswitch settings 16# openvswitch settings
13OVS_PHYSICAL_INTERFACE=${OVS_PHYSICAL_INTERFACE:-''} 17OVS_PHYSICAL_INTERFACE=${OVS_PHYSICAL_INTERFACE:-''}
18
19# set ovs-fp mechanism driver
20Q_ML2_PLUGIN_MECHANISM_DRIVERS=ovs-fp
21
22# disable security group and ovs hybrid for better networking performance
23Q_DISABLE_SECURITY=${Q_DISABLE_SECURITY:-False}