]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Switching to templated init scripts using openstack-pkg-tools >= 13.
authorThomas Goirand <thomas@goirand.fr>
Fri, 3 Oct 2014 05:27:02 +0000 (13:27 +0800)
committerThomas Goirand <thomas@goirand.fr>
Fri, 3 Oct 2014 05:33:28 +0000 (13:33 +0800)
Rewritten-From: e8df581b4d5987b9e53395ee1417de68caffe34e

19 files changed:
xenial/debian/changelog
xenial/debian/cinder-api.init [deleted file]
xenial/debian/cinder-api.init.in [new file with mode: 0644]
xenial/debian/cinder-api.service [deleted file]
xenial/debian/cinder-api.upstart.in [deleted file]
xenial/debian/cinder-backup.init [deleted file]
xenial/debian/cinder-backup.init.in [new file with mode: 0644]
xenial/debian/cinder-backup.service [deleted file]
xenial/debian/cinder-backup.upstart.in [deleted file]
xenial/debian/cinder-scheduler.init [deleted file]
xenial/debian/cinder-scheduler.init.in [new file with mode: 0644]
xenial/debian/cinder-scheduler.service [deleted file]
xenial/debian/cinder-scheduler.upstart.in [deleted file]
xenial/debian/cinder-volume.init [deleted file]
xenial/debian/cinder-volume.init.in [new file with mode: 0644]
xenial/debian/cinder-volume.service [deleted file]
xenial/debian/cinder-volume.upstart.in [deleted file]
xenial/debian/control
xenial/debian/rules

index 4f65a6fdcdc56ca65f77b03897906bbf9142152a..89426bbe01c92e1b97d4aff36a67c9932c3b24a0 100644 (file)
@@ -1,3 +1,9 @@
+cinder (2014.2~rc1-2) UNRELEASED; urgency=medium
+
+  * Switching to templated init scripts using openstack-pkg-tools >= 13.
+
+ -- Thomas Goirand <zigo@debian.org>  Fri, 03 Oct 2014 13:31:35 +0800
+
 cinder (2014.2~rc1-1) experimental; urgency=medium
 
   * New upstream release.
diff --git a/xenial/debian/cinder-api.init b/xenial/debian/cinder-api.init
deleted file mode 100644 (file)
index d50d4ad..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          cinder-api
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
-# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Cinder Api
-# Description:       Provides EBS like storage for your
-#                    virtual machine instances
-### END INIT INFO
-
-# Author: 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 Cinder Api"
-NAME=cinder-api
-DAEMON=/usr/bin/cinder-api
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
-PIDFILE=/var/run/cinder/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CINDER_USER=cinder
-LOCK_DIR=/var/lock/cinder/
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-mkdir -p ${LOCK_DIR} /var/run/cinder
-chown ${CINDER_USER} ${LOCK_DIR} /var/run/cinder
-
-. /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/cinder/cinder-api.log"
-
-do_start(){
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --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
-
-exit 0
diff --git a/xenial/debian/cinder-api.init.in b/xenial/debian/cinder-api.init.in
new file mode 100644 (file)
index 0000000..a3eaf8e
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-api
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
+# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Cinder Api
+# Description:       Provides EBS like storage for your
+#                    virtual machine instances
+### END INIT INFO
+
+# Author: 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 Cinder Api"
+PROJECT_NAME=cinder
+NAME=${PROJECT_NAME}-api
diff --git a/xenial/debian/cinder-api.service b/xenial/debian/cinder-api.service
deleted file mode 100644 (file)
index ce3dded..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Cinder Api
-Documentation=http://docs.openstack.org/
-After=postgresql.service mysql.service keystone.service rabbitmq-server.service ntp.service network.service
-
-[Service]
-User=cinder
-Group=cinder
-ExecStart=/etc/init.d/cinder-api systemd-start
-ExecStop=/etc/init.d/cinder-api systemd-stop
-PIDFile=/var/run/cinder/cinder-api.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/xenial/debian/cinder-api.upstart.in b/xenial/debian/cinder-api.upstart.in
deleted file mode 100644 (file)
index 0a321da..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-description "Cinder api server"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
-    mkdir -p /var/run/cinder
-    chown cinder:cinder /var/run/cinder
-
-    mkdir -p /var/lock/cinder
-    chown cinder:root /var/lock/cinder
-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/cinder/$UPSTART_JOB.log"
-
-       exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-api -- \
-                              --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
-end script
diff --git a/xenial/debian/cinder-backup.init b/xenial/debian/cinder-backup.init
deleted file mode 100644 (file)
index d7f2b6c..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          cinder-backup
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
-# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Cinder Backup
-# Description:       Provides Cinder Backup
-### 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 Cinder Backup"
-NAME=cinder-backup
-DAEMON=/usr/bin/cinder-backup
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
-PIDFILE=/var/run/cinder/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CINDER_USER=cinder
-LOCK_DIR=/var/lock/cinder/
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-mkdir -p ${LOCK_DIR} /var/run/cinder
-chown ${CINDER_USER} ${LOCK_DIR} /var/run/cinder
-
-. /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/cinder/cinder-backup.log"
-
-do_start() {
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --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
-
-exit 0
diff --git a/xenial/debian/cinder-backup.init.in b/xenial/debian/cinder-backup.init.in
new file mode 100644 (file)
index 0000000..8ac2203
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-backup
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
+# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Cinder Backup
+# Description:       Provides Cinder Backup
+### 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 Cinder Backup"
+PROJECT_NAME=cinder
+NAME=${PROJECT_NAME}-backup
diff --git a/xenial/debian/cinder-backup.service b/xenial/debian/cinder-backup.service
deleted file mode 100644 (file)
index 6ba554f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Cinder Backup
-Documentation=http://docs.openstack.org/
-After=postgresql.service mysql.service keystone.service rabbitmq-server.service ntp.service network.service
-
-[Service]
-User=cinder
-Group=cinder
-ExecStart=/etc/init.d/cinder-backup systemd-start
-ExecStop=/etc/init.d/cinder-backup systemd-stop
-PIDFile=/var/run/cinder/cinder-backup.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/xenial/debian/cinder-backup.upstart.in b/xenial/debian/cinder-backup.upstart.in
deleted file mode 100644 (file)
index a154f88..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-description "Cinder backup server"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
-    mkdir -p /var/run/cinder
-    chown cinder:cinder /var/run/cinder
-
-    mkdir -p /var/lock/cinder
-    chown cinder:root /var/lock/cinder
-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/cinder/$UPSTART_JOB.log"
-
-       exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-backup -- \
-                              --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
-end script
diff --git a/xenial/debian/cinder-scheduler.init b/xenial/debian/cinder-scheduler.init
deleted file mode 100644 (file)
index 63806a9..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          cinder-scheduler
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
-# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Cinder Scheduler
-# Description:       Provides EBS like storage for your
-#                    virtual machine instances
-### END INIT INFO
-
-# Author: 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 Cinder Scheduler"
-NAME=cinder-scheduler
-DAEMON=/usr/bin/cinder-scheduler
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
-PIDFILE=/var/run/cinder/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CINDER_USER=cinder
-LOCK_DIR=/var/lock/cinder/
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-mkdir -p ${LOCK_DIR} /var/run/cinder
-chown ${CINDER_USER} ${LOCK_DIR} /var/run/cinder
-
-. /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/cinder/cinder-scheduler.log"
-
-do_start() {
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --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
-
-exit 0
diff --git a/xenial/debian/cinder-scheduler.init.in b/xenial/debian/cinder-scheduler.init.in
new file mode 100644 (file)
index 0000000..c5caa29
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-scheduler
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
+# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Cinder Scheduler
+# Description:       Provides EBS like storage for your
+#                    virtual machine instances
+### END INIT INFO
+
+# Author: 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 Cinder Scheduler"
+PROJECT_NAME=cinder
+NAME=${PROJECT_NAME}-scheduler
diff --git a/xenial/debian/cinder-scheduler.service b/xenial/debian/cinder-scheduler.service
deleted file mode 100644 (file)
index 52afe44..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Cinder Scheduler
-Documentation=http://docs.openstack.org/
-After=postgresql.service mysql.service keystone.service rabbitmq-server.service ntp.service network.service
-
-[Service]
-User=cinder
-Group=cinder
-ExecStart=/etc/init.d/cinder-scheduler systemd-start
-ExecStop=/etc/init.d/cinder-scheduler systemd-stop
-PIDFile=/var/run/cinder/cinder-scheduler.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/xenial/debian/cinder-scheduler.upstart.in b/xenial/debian/cinder-scheduler.upstart.in
deleted file mode 100644 (file)
index ce22933..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-description "Cinder scheduler server"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
-    mkdir -p /var/run/cinder
-    chown cinder:cinder /var/run/cinder
-
-    mkdir -p /var/lock/cinder
-    chown cinder:root /var/lock/cinder
-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/cinder/$UPSTART_JOB.log"
-
-       exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-scheduler -- \
-                              --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
-end script
diff --git a/xenial/debian/cinder-volume.init b/xenial/debian/cinder-volume.init
deleted file mode 100644 (file)
index 23542cc..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/sh
-### BEGIN INIT INFO
-# Provides:          cinder-volume
-# Required-Start:    $network $local_fs $remote_fs $syslog
-# Required-Stop:     $remote_fs
-# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
-# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Cinder Volume
-# Description:       Provides EBS like storage for your
-#                    virtual machine instances
-### END INIT INFO
-
-# Author: Julien Danjou <acid@debian.org>
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="OpenStack Cinder Volume"
-NAME=cinder-volume
-DAEMON=/usr/bin/cinder-volume
-DAEMON_ARGS="--config-file=/etc/cinder/cinder.conf"
-PIDFILE=/var/run/cinder/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-CINDER_USER=cinder
-LOCK_DIR=/var/lock/cinder/
-
-# Exit if the package is not installed
-[ -x $DAEMON ] || exit 0
-
-mkdir -p ${LOCK_DIR} /var/run/cinder
-chown ${CINDER_USER} ${LOCK_DIR} /var/run/cinder
-
-. /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/cinder/cinder-volume.log"
-
-do_start() {
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
-               || return 1
-       start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder --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 $?
-;;
-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
-
-exit 0
diff --git a/xenial/debian/cinder-volume.init.in b/xenial/debian/cinder-volume.init.in
new file mode 100644 (file)
index 0000000..15193ef
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          cinder-volume
+# Required-Start:    $network $local_fs $remote_fs $syslog
+# Required-Stop:     $remote_fs
+# Should-Start:      postgresql mysql keystone rabbitmq-server ntp
+# Should-Stop:       postgresql mysql keystone rabbitmq-server ntp
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Cinder Volume
+# Description:       Provides EBS like storage for your
+#                    virtual machine instances
+### END INIT INFO
+
+# Author: Julien Danjou <acid@debian.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenStack Cinder Volume"
+PROJECT_NAME=cinder
+NAME=${PROJECT_NAME}-volume
diff --git a/xenial/debian/cinder-volume.service b/xenial/debian/cinder-volume.service
deleted file mode 100644 (file)
index 0fbc278..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=OpenStack Cinder Volume
-Documentation=http://docs.openstack.org/
-After=postgresql.service mysql.service keystone.service rabbitmq-server.service ntp.service network.service
-
-[Service]
-User=cinder
-Group=cinder
-ExecStart=/etc/init.d/cinder-volume systemd-start
-ExecStop=/etc/init.d/cinder-volume systemd-stop
-PIDFile=/var/run/cinder/cinder-volume.pid
-Restart=on-failure
-Type=forking
-
-[Install]
-WantedBy=multi-user.target
-
diff --git a/xenial/debian/cinder-volume.upstart.in b/xenial/debian/cinder-volume.upstart.in
deleted file mode 100644 (file)
index ebb14f0..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-description "Cinder volume server"
-author "Chuck Short <zulcss@ubuntu.com>"
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-chdir /var/run
-
-pre-start script
-    mkdir -p /var/run/cinder
-    chown cinder:cinder /var/run/cinder
-
-    mkdir -p /var/lock/cinder
-    chown cinder:root /var/lock/cinder
-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/cinder/$UPSTART_JOB.log"
-
-       exec start-stop-daemon --start --chuid cinder --exec /usr/bin/cinder-volume -- \
-                              --config-file=/etc/cinder/cinder.conf $DAEMON_ARGS
-end script
index a4522e0f7a0a1d5395e05937e0ff4436098c4625..f69fcdb31b54788a9083958eae794eb91347dd01 100644 (file)
@@ -6,7 +6,7 @@ Uploaders: Julien Danjou <acid@debian.org>,
            Thomas Goirand <zigo@debian.org>,
            Mehdi Abaakouk <sileht@sileht.net>
 Build-Depends: debhelper (>= 8.0.0),
-               openstack-pkg-tools (>= 12~),
+               openstack-pkg-tools (>= 13~),
                po-debconf,
                python-all (>= 2.6.6-3~),
                python-pbr (>= 0.6),
@@ -38,7 +38,7 @@ Build-Depends-Indep: python-anyjson (>= 0.3.3),
                      python-oslo.db (>= 0.4.0),
                      python-oslo.i18n (>= 1.0.0),
                      python-oslo.messaging (>= 1.4.1),
-                     python-oslo.rootwrap (>= 1.3.0.0~a1),
+                     python-oslo.rootwrap (>= 1.3.0.0),
                      python-oslosphinx (>= 2.2.0),
                      python-osprofiler,
                      python-paramiko (>= 1.13.0),
@@ -89,7 +89,7 @@ Depends: python-anyjson (>= 0.3.3),
          python-oslo.db (>= 0.4.0),
          python-oslo.i18n (>= 1.0.0),
          python-oslo.messaging (>= 1.4.1),
-         python-oslo.rootwrap (>= 1.3.0.0~a1),
+         python-oslo.rootwrap (>= 1.3.0.0),
          python-osprofiler,
          python-paramiko (>= 1.9.0),
          python-paste,
index 3d7eca81df011bb7c5f9a5c3527278a776945fd8..553a3fb05cb475772eb1887f789e5dce8058292a 100755 (executable)
@@ -15,7 +15,7 @@ endif
 override_dh_clean:
        dh_clean
        rm -f debian/cinder-common.config debian/cinder-common.postinst debian/cinder-api.config debian/cinder-api.postinst debian/cinder-volume.postinst
-       rm -rf setuptools_git-*-py*.egg/
+       rm -rf debian/*.upstart debian/*.service
 
 override_dh_install:
        dh_install --fail-missing -Xbin/cinder-all