upstart jobs, using openstack-pkg-tools >= 13.
neutron (2014.2~rc1-1) experimental; urgency=medium
* New upstream release.
+ * Now using templated init script for sysv-rc, generated systemd unit and
+ upstart jobs, using openstack-pkg-tools >= 13.
-- Thomas Goirand <zigo@debian.org> Fri, 03 Oct 2014 18:53:11 +0800
Section: net
Priority: optional
Maintainer: PKG OpenStack <openstack-devel@lists.alioth.debian.org>
-Uploaders: Julien Danjou <acid@debian.org>,
- Thomas Goirand <zigo@debian.org>,
- Mehdi Abaakouk <sileht@sileht.net>
+Uploaders: Thomas Goirand <zigo@debian.org>
Build-Depends: debhelper (>= 9),
+ dh-systemd,
openstack-pkg-tools (>= 12~),
po-debconf,
python-all (>= 2.6),
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-dhcp-agent
-# Required-Start: $network $local_fs $remote_fs $syslog
-# Required-Stop: $remote_fs
-# Should-Start: mysql postgresql rabbitmq-server keystone
-# Should-Stop: mysql postgresql rabbitmq-server keystone
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Neutron DHCP agent
-# Description: Provide DHCP agent for neutron
-### END INIT INFO
-
-# Author: Mehdi Abaakouk <sileht@sileht.net>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron DHCP agent"
-NAME=neutron-dhcp-agent
-DAEMON=/usr/bin/neutron-dhcp-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/dhcp-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-dhcp-agent
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Should-Start: mysql postgresql rabbitmq-server keystone
+# Should-Stop: mysql postgresql rabbitmq-server keystone
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Neutron DHCP agent
+# Description: Provide DHCP agent for neutron
+### END INIT INFO
+
+# Author: Mehdi Abaakouk <sileht@sileht.net>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron DHCP agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-dhcp-agent
+# --config-file=/etc/neutron/neutron.conf will be happened
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/dhcp_agent.ini"
-/var/log/neutron/dhcp-agent.log {
+/var/log/neutron/neutron-dhcp-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - DHCP Service
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-dhcp-agent systemd-start
-ExecStop=/etc/init.d/neutron-dhcp-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-dhcp-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron l3 agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/dhcp-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-dhcp-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-l3-agent
-# 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 L3 agent
-# Description: Provide L3 agent for neutron
-### END INIT INFO
-
-# Authors: Mehdi Abaakouk <sileht@sileht.net>
-# Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron L3 agent"
-NAME=neutron-l3-agent
-DAEMON=/usr/bin/neutron-l3-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/l3-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-l3-agent
+# 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 L3 agent
+# Description: Provide L3 agent for neutron
+### END INIT INFO
+
+# Authors: Mehdi Abaakouk <sileht@sileht.net>
+# Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron L3 agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-l3-agent
+# --config-file=/etc/neutron/neutron.conf will be happened
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/l3_agent.ini"
-/var/log/neutron/l3-agent.log {
+/var/log/neutron/neutron-l3-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - L3 Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-l3-agent systemd-start
-ExecStop=/etc/init.d/neutron-l3-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-l3-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron l3 plugin agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/l3-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-l3-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-lbaas-agent
-# Required-Start: $network $local_fs $remote_fs $syslog
-# Required-Stop: $remote_fs
-# Should-Start: mysql postgresql rabbitmq-server keystone
-# Should-Stop: mysql postgresql rabbitmq-server keystone
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Neutron LBaaS agent
-# Description: Provide LBaaS agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron LBaaS agent"
-NAME=neutron-lbaas-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/lbaas-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-lbaas-agent
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Should-Start: mysql postgresql rabbitmq-server keystone
+# Should-Stop: mysql postgresql rabbitmq-server keystone
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Neutron LBaaS agent
+# Description: Provide LBaaS agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron LBaaS agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-lbaas-agent
+# --config-file=/etc/neutron/neutron.conf will be happened
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini"
-/var/log/neutron/lbaas-agent.log {
+/var/log/neutron/neutron-lbaas-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - LBAAS Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-lbaas-agent systemd-start
-ExecStop=/etc/init.d/neutron-lbaas-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-lbaas-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron LBaaS agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/lbaas-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-lbaas-agent -- \
- --config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-metadata-agent
-# 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 Metadata Agent agent
-# Description: Provide Metadata agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron Metadata Agent"
-NAME=neutron-metadata-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metadata-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-metadata-agent
+# 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 Metadata Agent agent
+# Description: Provide Metadata agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron Metadata Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-metadata-agent
+# --config-file=/etc/neutron/neutron.conf will be happened
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/metadata_agent.ini"
-/var/log/neutron/metadata-agent.log {
+/var/log/neutron/neutron-metadata-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - Metadata Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service neutron-l3-agent.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-metadata-agent systemd-start
-ExecStop=/etc/init.d/neutron-metadata-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-metadata-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron metadata plugin agent"
-author "Yolanda Robla <yolanda.robla@canonical.com>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metadata-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metadata-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-metering-agent
-# 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 Metering Agent agent
-# Description: Provides Metering agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron Metering Agent"
-NAME=neutron-metering-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metering-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-metering-agent
+# 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 Metering Agent agent
+# Description: Provides Metering agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron Metering Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-metering-agent
+# --config-file=/etc/neutron/neutron.conf will be happened
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/metering_agent.ini"
-/var/log/neutron/metering-agent.log {
+/var/log/neutron/neutron-metering-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - Metering Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-metering-agent systemd-start
-ExecStop=/etc/init.d/neutron-metering-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-metering-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron Metering plugin agent"
-author "Thomas Goirand <zigo@debian.org>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metering-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metering-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-plugin-linuxbridge-agent
-# Required-Start: $network $local_fs $remote_fs $syslog
-# Required-Stop: $remote_fs
-# Should-Start: mysql postgresql rabbitmq-server keystone
-# Should-Stop: mysql postgresql rabbitmq-server keystone
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Neutron LinuxBridge Agent
-# Description: Agent to use within neutron linuxbridge client
-### END INIT INFO
-
-# Author: Ghe Rivero <ghe.rivero@stackops.com>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="Openstack Neutron LinuxBridge Plugin Agent"
-NAME=neutron-linuxbridge-agent
-DAEMON=/usr/bin/neutron-linuxbridge-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini --log-file=/var/log/neutron/linuxbridge-agent.log"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CONF_FILE="/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-. /lib/lsb/init-functions
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
-
-:
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-plugin-linuxbridge-agent
+# Required-Start: $network $local_fs $remote_fs $syslog
+# Required-Stop: $remote_fs
+# Should-Start: mysql postgresql rabbitmq-server keystone
+# Should-Stop: mysql postgresql rabbitmq-server keystone
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Neutron LinuxBridge Agent
+# Description: Agent to use within neutron linuxbridge client
+### END INIT INFO
+
+# Author: Ghe Rivero <ghe.rivero@stackops.com>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+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
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
-/var/log/neutron/linuxbridge-agent.log {
+/var/log/neutron/neutron-linuxbridge-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - LinuxBridge Plugin Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-linuxbridge-agent systemd-start
-ExecStop=/etc/init.d/neutron-linuxbridge-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-linuxbridge-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron server"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/linuxbridge-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-linuxbridge-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini \
- $DAEMON_ARGS
-end script
-/var/log/neutron/nec-agent.log {
+/var/log/neutron/neutron-nec-agent.log {
daily
missingok
compress
+++ /dev/null
-description "Neutron plugin NEC agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/nec-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-nec-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/nec/nec.ini \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-plugin-openvswitch-agent
-# Required-Start: $network $local_fs $remote_fs $syslog openvswitch-switch
-# Required-Stop: $remote_fs openvswitch-switch
-# Should-Start: mysql postgresql rabbitmq-server keystone
-# Should-Stop: mysql postgresql rabbitmq-server keystone
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: Neutron OpenVSwitch Agent
-# Description: Agent to use within neutron openswitch client
-### END INIT INFO
-
-# Authors: Julien Danjou <acid@debian.org>, Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="Openstack Neutron OpenVSwitch Plugin Agent"
-NAME=neutron-openvswitch-agent
-DAEMON=/usr/bin/neutron-openvswitch-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CONF_FILE=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-# Read configuration variable file if it is present
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="${DAEMON_ARGS} --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="${DAEMON_ARGS} --log-file=/var/log/neutron/ovs-agent.log"
-
-. /lib/lsb/init-functions
-
-[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
-. /usr/share/neutron-common/plugin_guess_func
-
-### Maintain the plugin selection so that we can load the corresponding .ini file ###
-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
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- if [ -x /usr/bin/neutron-ovs-cleanup ] ; then
- if [ ! -e /var/run/neutron-ovs-cleanup-performed ] ; then
- /usr/bin/neutron-ovs-cleanup
- touch /var/run/neutron-ovs-cleanup-performed
- fi
- fi
- start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
-
-:
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-plugin-openvswitch-agent
+# Required-Start: $network $local_fs $remote_fs $syslog openvswitch-switch
+# Required-Stop: $remote_fs openvswitch-switch
+# Should-Start: mysql postgresql rabbitmq-server keystone
+# Should-Stop: mysql postgresql rabbitmq-server keystone
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Neutron OpenVSwitch Agent
+# Description: Agent to use within neutron openswitch client
+### END INIT INFO
+
+# Authors: Julien Danjou <acid@debian.org>, Thomas Goirand <zigo@debian.org>
+
+DESC="Openstack Neutron OpenVSwitch Plugin Agent"
+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
-/var/log/neutron/ovs-agent.log {
+/var/log/neutron/neutron-openvswitch-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - OpenVSwithc Plugin Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-openvswitch-agent systemd-start
-ExecStop=/etc/init.d/neutron-openvswitch-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-openvswitch-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron plugin ryu agent"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/ryu-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-ryu-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ryu/ryu.ini \
- $DAEMON_ARGS
-end script
+++ /dev/null
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-server
-# Required-Start: $remote_fs $syslog
-# Required-Stop: $remote_fs $syslog
-# Should-Start: mysql postgresql rabbitmq-server keystone
-# Should-Stop: mysql postgresql rabbitmq-server keystone
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
-# Short-Description: neutron-server
-# Description: Provides the Neutron networking service
-### END INIT INFO
-
-export PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron Server"
-NAME=neutron-server
-DAEMON=/usr/bin/${NAME}
-PIDFILE=/var/run/neutron/${NAME}.pid
-SCRIPTNAME=/etc/init.d/${NAME}
-LOGFILE=/var/log/neutron/neutron-server.log
-DAEMON_DIR=/var/run
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
-
-[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
-. /usr/share/neutron-common/plugin_guess_func
-
-### Maintain the plugin selection so that we can load the corresponding .ini file ###
-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-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
-
-### Neutron folders creation ###
-make_neutron_folder () {
- if [ ! -e ${1} ] ; then
- mkdir -p ${1}
- if [ ! -d ${1} ] ; then
- echo "${1} folder cannot be created: exiting!"
- exit 1
- fi
- chown neutron:neutron ${1}
- fi
-}
-for i in /var/run/neutron /var/log/neutron /var/lib/neutron/tmp ; do
- make_neutron_folder ${i}
-done
-export TMPDIR=/var/lib/neutron/tmp
-
-### Standard init script start/stop/etc. stuff ###
-do_start () {
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --chdir $DAEMON_DIR --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --chdir $DAEMON_DIR --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop () {
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
-start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
-;;
-stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- *) log_end_msg 1 ;;
- esac
-;;
-restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
-;;
-status)
- status_of_proc -p $PIDFILE $DAEMON neutron-server && exit 0 || exit $?
-;;
-systemd-start)
- do_start
-;;
-systemd-stop)
- do_stop
-;;
-*)
- log_action_msg "Usage: /etc/init.d/neutron-server {start|stop|restart|force-reload|status}"
- exit 1
-;;
-esac
-
-exit 0
--- /dev/null
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-server
+# Required-Start: $remote_fs $syslog
+# Required-Stop: $remote_fs $syslog
+# Should-Start: mysql postgresql rabbitmq-server keystone
+# Should-Stop: mysql postgresql rabbitmq-server keystone
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: neutron-server
+# Description: Provides the Neutron networking service
+### END INIT INFO
+
+DESC="OpenStack Neutron Server"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-server
+
+### 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 [ -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
+
+### Neutron folders creation ###
+mkdir -p /var/lib/neutron/tmp
+chown neutron:neutron /var/lib/neutron/tmp
+export TMPDIR=/var/lib/neutron/tmp
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - API server
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-server systemd-start
-ExecStop=/etc/init.d/neutron-server systemd-stop
-PIDFile=/var/run/neutron/neutron-server.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides: neutron-vpn-agent
-# 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 VPN Agent agent
-# Description: Provides VPN agent for neutron
-### END INIT INFO
-
-# Author: Thomas Goirand <zigo@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Neutron VPN Agent"
-NAME=neutron-vpn-agent
-DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini"
-PIDFILE=/var/run/neutron/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-. /lib/lsb/init-functions
-
-[ -r /etc/default/openstack ] && . /etc/default/openstack
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
-[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/vpn-agent.log"
-
-mkdir -p /var/run/neutron
-chown neutron:neutron /var/run/neutron
-
-do_start()
-{
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
- || return 1
- start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON -- \
- $DAEMON_ARGS \
- || return 2
-}
-
-do_stop()
-{
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE
- RETVAL="$?"
- rm -f $PIDFILE
- return "$RETVAL"
-}
-
-case "$1" in
- start)
- log_daemon_msg "Starting $DESC" "$NAME"
- do_start
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- stop)
- log_daemon_msg "Stopping $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1) log_end_msg 0 ;;
- 2) log_end_msg 1 ;;
- esac
- ;;
- status)
- status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
- ;;
- systemd-start)
- do_start
- ;;
- systemd-stop)
- do_stop
- ;;
- restart|force-reload)
- log_daemon_msg "Restarting $DESC" "$NAME"
- do_stop
- case "$?" in
- 0|1)
- do_start
- case "$?" in
- 0) log_end_msg 0 ;;
- 1) log_end_msg 1 ;; # Old process is still running
- *) log_end_msg 1 ;; # Failed to start
- esac
- ;;
- *)
- # Failed to stop
- log_end_msg 1
- ;;
- esac
- ;;
-
- *)
- echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
- exit 3
- ;;
-esac
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: neutron-vpn-agent
+# 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 VPN Agent agent
+# Description: Provides VPN agent for neutron
+### END INIT INFO
+
+# Author: Thomas Goirand <zigo@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Neutron VPN Agent"
+PROJECT_NAME=neutron
+NAME=${PROJECT_NAME}-vpn-agent
+DAEMON=/usr/bin/${NAME}
+# --config-file=/etc/neutron/neutron.conf will be happened
+# to DAEMON_ARGS later by openstack-pkg-tools
+DAEMON_ARGS="--config-file=/etc/neutron/vpn_agent.ini"
-/var/log/neutron/vpn-agent.log {
+/var/log/neutron/neutron-vpn-agent.log {
daily
missingok
compress
+++ /dev/null
-[Unit]
-Description=OpenStack Networking service - VPN Agent
-Documentation=http://docs.openstack.org/
-After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
-
-[Service]
-User=neutron
-Group=neutron
-ExecStart=/etc/init.d/neutron-vpn-agent systemd-start
-ExecStop=/etc/init.d/neutron-vpn-agent systemd-stop
-PIDFile=/var/run/neutron/neutron-vpn-agent.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
+++ /dev/null
-description "Neutron VPN plugin agent"
-author "Thomas Goirand <zigo@debian.org>"
-
-start on runlevel [2345]
-stop on runlevel [016]
-
-chdir /var/run
-
-pre-start script
- mkdir -p /var/run/neutron
- chown neutron:root /var/run/neutron
-end script
-
-script
- [ -r /etc/default/openstack ] && . /etc/default/openstack
- [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
-
- [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
- [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/vpn-agent.log"
-
- exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-vpn-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini \
- $DAEMON_ARGS
-end script
#!/usr/bin/make -f
-#export DH_VERBOSE=1
-
include /usr/share/openstack-pkg-tools/pkgos.make
-
export OSLO_PACKAGE_VERSION=$(VERSION)
PYTHONS:=$(shell pyversions -vr)
%:
- dh $@ --buildsystem=python_distutils --with python2
+ dh $@ --buildsystem=python_distutils --with python2,systemd
override_dh_auto_install:
echo "Nothing to do!"
debian/neutron-dhcp-agent.postinst \
debian/neutron-metadata-agent.config \
debian/neutron-metadata-agent.postinst
+ rm -f debian/*.init debian/*.service debian/*.upstart
override_dh_clean:
dh_clean