#!/bin/sh ### BEGIN INIT INFO # Provides: neutron-ovn-maintenance-worker # Required-Start: $network $local_fs $remote_fs $syslog # Required-Stop: $remote_fs # Should-Start: mysql postgresql rabbitmq-server keystone openvswitch-switch # Should-Stop: mysql postgresql rabbitmq-server keystone openvswitch-switch # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Neutron OVN maintenance worker # Description: Provides the Neutron OVN ovn maintenance worker ### END INIT INFO # Author: Thomas Goirand DESC="OpenStack Neutron OVN Maintenance Worker (neutron-ovn-maintenance-worker)" PROJECT_NAME=neutron NAME=${PROJECT_NAME}-ovn-maintenance-worker SYSTEMD_TYPE=notify ### 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 ### [ -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 [ -z "${NEUTRON_PLUGIN_CONFIG}" ] ; then echo "Plugin not recognized: please edit /etc/init.d/neutron-ovn-maintenance-worker to select the correct .ini file to load for your plugin" else DAEMON_ARGS="--config-file=${NEUTRON_PLUGIN_CONFIG}" DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin" fi # Load server side config files if [ -e /etc/neutron/server.conf.d ] ; then DAEMON_ARGS="--config-dir=/etc/neutron/server.conf.d ${DAEMON_ARGS}" fi ### end of plugin selection ### export OS_OSLO_MESSAGING_RABBIT__PROCESSNAME=neutron-ovn-maintenance-worker