]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
do not parse neutron.conf to know the core_plugin name in ovs and lb
authorgustavo panizzo <gfa@zumbi.com.ar>
Wed, 8 Apr 2015 08:44:12 +0000 (16:44 +0800)
committergustavo panizzo <gfa@zumbi.com.ar>
Thu, 9 Apr 2015 09:28:38 +0000 (17:28 +0800)
agent.

OVS and LB do not work as core_plugin since Juno, they need ML2 to work.

Rewritten-From: a6bad05c7dd4f2330ebf50d1231b149108a632c8

xenial/debian/neutron-plugin-linuxbridge-agent.init.in
xenial/debian/neutron-plugin-openvswitch-agent.init.in

index 9e9d3901e9335ffdfa417f7738b2ec13fbfe2fa4..110ef4252dbaedc45180e108c6ab5fc52a986b63 100644 (file)
@@ -18,6 +18,12 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 DESC="Openstack Neutron LinuxBridge Plugin Agent"
 PROJECT_NAME=neutron
 NAME=${PROJECT_NAME}-linuxbridge-agent
-# --config-file=/etc/neutron/neutron.conf will be happened 
+# --config-file=/etc/neutron/neutron.conf will be happened
 # to DAEMON_ARGS later by openstack-pkg-tools
-DAEMON_ARGS="--config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
+
+# Since Juno LB plugin as been deprecated as core_plugin, it has been
+# replaced by ml2 as core_plugin and lb as agent. Making ml2 mandatory
+# to use this agent
+
+DAEMON_ARGS="--config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini --config-file=/etc/neutron/plugins/ml2/ml2_conf.ini"
+
index 58978855e6c1204c7e60e81e4397a863a7c1afe3..d5f9f48089a9271583114e84cb3dfe1afd402291 100644 (file)
@@ -18,30 +18,7 @@ PROJECT_NAME=neutron
 NAME=${PROJECT_NAME}-openvswitch-agent
 CONF_FILE=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
 
-### Maintain the plugin selection so that we can load the corresponding .ini file    ###
-### after this, openstack-pkg-tools will add --config-file=/etc/neutron/neutron.conf ###
-DAEMON_ARGS=""
-[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
-. /usr/share/neutron-common/plugin_guess_func
-
-if ! [ -r /etc/neutron/neutron.conf ] ; then
-       echo "Cloud not read /etc/neutron/neutron.conf: exiting"
-       exit 0
-fi
-
-CURRENT_PLUGIN=`grep "^[ \t]*core_plugin[ \t]*=[ \t]*[._a-zA-Z0-9]*\$" /etc/neutron/neutron.conf | sed -e 's/^[ \t]*core_plugin[ \t]*=[ \t]*//'`
-if [ -z "${CURRENT_PLUGIN}" ] ; then
-       echo "No core_plugin= value found: please set it and try again"
-       exit 0
-fi
-neutron_core_plugin_to_plugin_name ${CURRENT_PLUGIN}
-neutron_plugin_ini_path ${NEUTRON_PLUGIN_NAME}
-if [ ${NEUTRON_PLUGIN_NAME} = ml2 ]; then
-            DAEMON_ARGS="${DAEMON_ARGS} --config-file=${CONF_FILE}"
-fi
-if [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then
-       echo "Plugin not recognized: please edit /etc/init.d/neutron-server to select the correct .ini file to load for your plugin"
-else
-       DAEMON_ARGS="${DAEMON_ARGS} --config-file=${NEUTRON_PLUGIN_CONFIG}"
-       DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
-fi
+# Since Juno OVS plugin as been deprecated as core_plugin, it has been
+# replaced by ml2 as core_plugin and ovs as agent. Making ml2 mandatory
+# to use this agent
+DAEMON_ARGS="--config-file=/etc/neutron/plugins/ml2/ml2_conf.ini"