From: Thomas Goirand Date: Fri, 3 Oct 2014 10:52:49 +0000 (+0800) Subject: * Now using templated init script for sysv-rc, generated systemd unit and X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=11488a78aeb7315d627c67240f6f636d6c4e5ecc;p=openstack-build%2Fneutron-build.git * Now using templated init script for sysv-rc, generated systemd unit and upstart jobs, using openstack-pkg-tools >= 13. --- diff --git a/debian/changelog b/debian/changelog index ad64659b5..92ffff38d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ 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 Fri, 03 Oct 2014 18:53:11 +0800 diff --git a/debian/control b/debian/control index c89c8610d..b81e5aa9b 100644 --- a/debian/control +++ b/debian/control @@ -2,10 +2,9 @@ Source: neutron Section: net Priority: optional Maintainer: PKG OpenStack -Uploaders: Julien Danjou , - Thomas Goirand , - Mehdi Abaakouk +Uploaders: Thomas Goirand Build-Depends: debhelper (>= 9), + dh-systemd, openstack-pkg-tools (>= 12~), po-debconf, python-all (>= 2.6), diff --git a/debian/neutron-dhcp-agent.init b/debian/neutron-dhcp-agent.init deleted file mode 100644 index af48fe420..000000000 --- a/debian/neutron-dhcp-agent.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/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 - -# 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 diff --git a/debian/neutron-dhcp-agent.init.in b/debian/neutron-dhcp-agent.init.in new file mode 100644 index 000000000..2cb413111 --- /dev/null +++ b/debian/neutron-dhcp-agent.init.in @@ -0,0 +1,23 @@ +#!/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 + +# 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" diff --git a/debian/neutron-dhcp-agent.logrotate b/debian/neutron-dhcp-agent.logrotate index b0b9384dc..da6aff1b4 100644 --- a/debian/neutron-dhcp-agent.logrotate +++ b/debian/neutron-dhcp-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/dhcp-agent.log { +/var/log/neutron/neutron-dhcp-agent.log { daily missingok compress diff --git a/debian/neutron-dhcp-agent.service b/debian/neutron-dhcp-agent.service deleted file mode 100644 index ad73bf7e3..000000000 --- a/debian/neutron-dhcp-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-dhcp-agent.upstart.in b/debian/neutron-dhcp-agent.upstart.in deleted file mode 100644 index 3170cdf87..000000000 --- a/debian/neutron-dhcp-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron l3 agent" -author "Chuck Short " - -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 diff --git a/debian/neutron-l3-agent.init b/debian/neutron-l3-agent.init deleted file mode 100644 index 0db175f3b..000000000 --- a/debian/neutron-l3-agent.init +++ /dev/null @@ -1,106 +0,0 @@ -#!/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 -# Thomas Goirand - -# 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 diff --git a/debian/neutron-l3-agent.init.in b/debian/neutron-l3-agent.init.in new file mode 100644 index 000000000..ccc8ea123 --- /dev/null +++ b/debian/neutron-l3-agent.init.in @@ -0,0 +1,24 @@ +#!/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 +# Thomas Goirand + +# 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" diff --git a/debian/neutron-l3-agent.logrotate b/debian/neutron-l3-agent.logrotate index 8db107214..e81917fb5 100644 --- a/debian/neutron-l3-agent.logrotate +++ b/debian/neutron-l3-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/l3-agent.log { +/var/log/neutron/neutron-l3-agent.log { daily missingok compress diff --git a/debian/neutron-l3-agent.service b/debian/neutron-l3-agent.service deleted file mode 100644 index 0f41918e5..000000000 --- a/debian/neutron-l3-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-l3-agent.upstart.in b/debian/neutron-l3-agent.upstart.in deleted file mode 100644 index 019c5ae11..000000000 --- a/debian/neutron-l3-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron l3 plugin agent" -author "Chuck Short " - -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 diff --git a/debian/neutron-lbaas-agent.init b/debian/neutron-lbaas-agent.init deleted file mode 100644 index cbdae9943..000000000 --- a/debian/neutron-lbaas-agent.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/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 - -# 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 diff --git a/debian/neutron-lbaas-agent.init.in b/debian/neutron-lbaas-agent.init.in new file mode 100644 index 000000000..cad5a1da4 --- /dev/null +++ b/debian/neutron-lbaas-agent.init.in @@ -0,0 +1,23 @@ +#!/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 + +# 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" diff --git a/debian/neutron-lbaas-agent.logrotate b/debian/neutron-lbaas-agent.logrotate index 078c729e8..9b2d71775 100644 --- a/debian/neutron-lbaas-agent.logrotate +++ b/debian/neutron-lbaas-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/lbaas-agent.log { +/var/log/neutron/neutron-lbaas-agent.log { daily missingok compress diff --git a/debian/neutron-lbaas-agent.service b/debian/neutron-lbaas-agent.service deleted file mode 100644 index b25da4139..000000000 --- a/debian/neutron-lbaas-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-lbaas-agent.upstart.in b/debian/neutron-lbaas-agent.upstart.in deleted file mode 100644 index 35f1893fd..000000000 --- a/debian/neutron-lbaas-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron LBaaS agent" -author "Chuck Short " - -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 diff --git a/debian/neutron-metadata-agent.init b/debian/neutron-metadata-agent.init deleted file mode 100644 index bfcbdeedd..000000000 --- a/debian/neutron-metadata-agent.init +++ /dev/null @@ -1,128 +0,0 @@ -#!/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 - -# 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 diff --git a/debian/neutron-metadata-agent.init.in b/debian/neutron-metadata-agent.init.in new file mode 100644 index 000000000..34552a59d --- /dev/null +++ b/debian/neutron-metadata-agent.init.in @@ -0,0 +1,23 @@ +#!/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 + +# 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" diff --git a/debian/neutron-metadata-agent.logrotate b/debian/neutron-metadata-agent.logrotate index bad11bb0d..9bfea2f03 100644 --- a/debian/neutron-metadata-agent.logrotate +++ b/debian/neutron-metadata-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/metadata-agent.log { +/var/log/neutron/neutron-metadata-agent.log { daily missingok compress diff --git a/debian/neutron-metadata-agent.service b/debian/neutron-metadata-agent.service deleted file mode 100644 index 5ebab498c..000000000 --- a/debian/neutron-metadata-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-metadata-agent.upstart.in b/debian/neutron-metadata-agent.upstart.in deleted file mode 100644 index 1af2195d4..000000000 --- a/debian/neutron-metadata-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron metadata plugin agent" -author "Yolanda Robla " - -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 diff --git a/debian/neutron-metering-agent.init b/debian/neutron-metering-agent.init deleted file mode 100644 index dbad51799..000000000 --- a/debian/neutron-metering-agent.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/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 - -# 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 diff --git a/debian/neutron-metering-agent.init.in b/debian/neutron-metering-agent.init.in new file mode 100644 index 000000000..2e3a3c660 --- /dev/null +++ b/debian/neutron-metering-agent.init.in @@ -0,0 +1,23 @@ +#!/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 + +# 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" diff --git a/debian/neutron-metering-agent.logrotate b/debian/neutron-metering-agent.logrotate index e3923c068..e3f2a5b28 100644 --- a/debian/neutron-metering-agent.logrotate +++ b/debian/neutron-metering-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/metering-agent.log { +/var/log/neutron/neutron-metering-agent.log { daily missingok compress diff --git a/debian/neutron-metering-agent.service b/debian/neutron-metering-agent.service deleted file mode 100644 index 0bc14a509..000000000 --- a/debian/neutron-metering-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-metering-agent.upstart.in b/debian/neutron-metering-agent.upstart.in deleted file mode 100644 index 888a2cfd6..000000000 --- a/debian/neutron-metering-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron Metering plugin agent" -author "Thomas Goirand " - -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 diff --git a/debian/neutron-plugin-linuxbridge-agent.init b/debian/neutron-plugin-linuxbridge-agent.init deleted file mode 100644 index 24f8f5adf..000000000 --- a/debian/neutron-plugin-linuxbridge-agent.init +++ /dev/null @@ -1,104 +0,0 @@ -#!/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 - -# 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 - -: diff --git a/debian/neutron-plugin-linuxbridge-agent.init.in b/debian/neutron-plugin-linuxbridge-agent.init.in new file mode 100644 index 000000000..9e9d3901e --- /dev/null +++ b/debian/neutron-plugin-linuxbridge-agent.init.in @@ -0,0 +1,23 @@ +#!/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 + +# 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" diff --git a/debian/neutron-plugin-linuxbridge-agent.logrotate b/debian/neutron-plugin-linuxbridge-agent.logrotate index 0a5b085e1..b3ad82bfe 100644 --- a/debian/neutron-plugin-linuxbridge-agent.logrotate +++ b/debian/neutron-plugin-linuxbridge-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/linuxbridge-agent.log { +/var/log/neutron/neutron-linuxbridge-agent.log { daily missingok compress diff --git a/debian/neutron-plugin-linuxbridge-agent.service b/debian/neutron-plugin-linuxbridge-agent.service deleted file mode 100644 index f4d93513d..000000000 --- a/debian/neutron-plugin-linuxbridge-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-plugin-linuxbridge-agent.upstart.in b/debian/neutron-plugin-linuxbridge-agent.upstart.in deleted file mode 100644 index b720f9ce4..000000000 --- a/debian/neutron-plugin-linuxbridge-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron server" -author "Chuck Short " - -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 diff --git a/debian/neutron-plugin-nec-agent.logrotate b/debian/neutron-plugin-nec-agent.logrotate index f204c8248..39fa2a24f 100644 --- a/debian/neutron-plugin-nec-agent.logrotate +++ b/debian/neutron-plugin-nec-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/nec-agent.log { +/var/log/neutron/neutron-nec-agent.log { daily missingok compress diff --git a/debian/neutron-plugin-nec-agent.upstart.in b/debian/neutron-plugin-nec-agent.upstart.in deleted file mode 100644 index bd13690a8..000000000 --- a/debian/neutron-plugin-nec-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron plugin NEC agent" -author "Chuck Short " - -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 diff --git a/debian/neutron-plugin-openvswitch-agent.init b/debian/neutron-plugin-openvswitch-agent.init deleted file mode 100644 index 76397db90..000000000 --- a/debian/neutron-plugin-openvswitch-agent.init +++ /dev/null @@ -1,140 +0,0 @@ -#!/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 , Thomas Goirand - -# 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 - -: diff --git a/debian/neutron-plugin-openvswitch-agent.init.in b/debian/neutron-plugin-openvswitch-agent.init.in new file mode 100644 index 000000000..58978855e --- /dev/null +++ b/debian/neutron-plugin-openvswitch-agent.init.in @@ -0,0 +1,47 @@ +#!/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 , Thomas Goirand + +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 diff --git a/debian/neutron-plugin-openvswitch-agent.logrotate b/debian/neutron-plugin-openvswitch-agent.logrotate index 60e2b40b8..7dfc813b3 100644 --- a/debian/neutron-plugin-openvswitch-agent.logrotate +++ b/debian/neutron-plugin-openvswitch-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/ovs-agent.log { +/var/log/neutron/neutron-openvswitch-agent.log { daily missingok compress diff --git a/debian/neutron-plugin-openvswitch-agent.service b/debian/neutron-plugin-openvswitch-agent.service deleted file mode 100644 index 3e579ffc6..000000000 --- a/debian/neutron-plugin-openvswitch-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-plugin-ryu-agent.upstart.in b/debian/neutron-plugin-ryu-agent.upstart.in deleted file mode 100644 index f7e0b27ac..000000000 --- a/debian/neutron-plugin-ryu-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron plugin ryu agent" -author "Chuck Short " - -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 diff --git a/debian/neutron-server.init b/debian/neutron-server.init deleted file mode 100644 index a5af3c555..000000000 --- a/debian/neutron-server.init +++ /dev/null @@ -1,140 +0,0 @@ -#! /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 diff --git a/debian/neutron-server.init.in b/debian/neutron-server.init.in new file mode 100644 index 000000000..ce6b27be5 --- /dev/null +++ b/debian/neutron-server.init.in @@ -0,0 +1,46 @@ +#! /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 diff --git a/debian/neutron-server.service b/debian/neutron-server.service deleted file mode 100644 index 7cfadbcda..000000000 --- a/debian/neutron-server.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-vpn-agent.init b/debian/neutron-vpn-agent.init deleted file mode 100644 index 04dec0b99..000000000 --- a/debian/neutron-vpn-agent.init +++ /dev/null @@ -1,105 +0,0 @@ -#!/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 - -# 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 diff --git a/debian/neutron-vpn-agent.init.in b/debian/neutron-vpn-agent.init.in new file mode 100644 index 000000000..053c2cac4 --- /dev/null +++ b/debian/neutron-vpn-agent.init.in @@ -0,0 +1,24 @@ +#!/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 + +# 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" diff --git a/debian/neutron-vpn-agent.logrotate b/debian/neutron-vpn-agent.logrotate index 70adb899f..bb1796685 100644 --- a/debian/neutron-vpn-agent.logrotate +++ b/debian/neutron-vpn-agent.logrotate @@ -1,4 +1,4 @@ -/var/log/neutron/vpn-agent.log { +/var/log/neutron/neutron-vpn-agent.log { daily missingok compress diff --git a/debian/neutron-vpn-agent.service b/debian/neutron-vpn-agent.service deleted file mode 100644 index adcdec5d8..000000000 --- a/debian/neutron-vpn-agent.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 - diff --git a/debian/neutron-vpn-agent.upstart.in b/debian/neutron-vpn-agent.upstart.in deleted file mode 100644 index 35e6b842d..000000000 --- a/debian/neutron-vpn-agent.upstart.in +++ /dev/null @@ -1,24 +0,0 @@ -description "Neutron VPN plugin agent" -author "Thomas Goirand " - -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 diff --git a/debian/rules b/debian/rules index 6bf3f2df1..8f82c5964 100755 --- a/debian/rules +++ b/debian/rules @@ -1,15 +1,12 @@ #!/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!" @@ -54,6 +51,7 @@ override_dh_auto_clean: 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