From b6d25531fe539c03173d9d68aca375e5d411071c Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 13 Sep 2012 16:14:57 +0200 Subject: [PATCH] Add debian dir --- debian/changelog | 88 +++++++++++++++++++++++ debian/cinder-api.init | 116 ++++++++++++++++++++++++++++++ debian/cinder-api.install | 1 + debian/cinder-api.logrotate | 4 ++ debian/cinder-api.manpages | 1 + debian/cinder-api.postrm | 7 ++ debian/cinder-common.config | 29 ++++++++ debian/cinder-common.dirs | 4 ++ debian/cinder-common.install | 9 +++ debian/cinder-common.manpages | 2 + debian/cinder-common.postinst | 38 ++++++++++ debian/cinder-scheduler.init | 116 ++++++++++++++++++++++++++++++ debian/cinder-scheduler.install | 1 + debian/cinder-scheduler.logrotate | 4 ++ debian/cinder-scheduler.manpages | 1 + debian/cinder-scheduler.postinst | 14 ++++ debian/cinder-scheduler.postrm | 7 ++ debian/cinder-volume.init | 116 ++++++++++++++++++++++++++++++ debian/cinder-volume.install | 1 + debian/cinder-volume.logrotate | 4 ++ debian/cinder-volume.manpages | 1 + debian/cinder-volume.postrm | 7 ++ debian/cinder.conf | 9 +++ debian/cinder_sudoers | 3 + debian/clean | 1 + debian/compat | 1 + debian/control | 103 ++++++++++++++++++++++++++ debian/copyright | 26 +++++++ debian/docs | 1 + debian/logging.conf | 76 ++++++++++++++++++++ debian/man/cinder-api.8 | 20 ++++++ debian/man/cinder-manage.8 | 21 ++++++ debian/man/cinder-rootwrap.8 | 22 ++++++ debian/man/cinder-scheduler.8 | 20 ++++++ debian/man/cinder-volume.8 | 20 ++++++ debian/python-cinder.install | 1 + debian/rules | 15 ++++ debian/source/format | 1 + debian/watch | 3 + 39 files changed, 914 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/cinder-api.init create mode 100644 debian/cinder-api.install create mode 100644 debian/cinder-api.logrotate create mode 100644 debian/cinder-api.manpages create mode 100644 debian/cinder-api.postrm create mode 100644 debian/cinder-common.config create mode 100644 debian/cinder-common.dirs create mode 100644 debian/cinder-common.install create mode 100644 debian/cinder-common.manpages create mode 100644 debian/cinder-common.postinst create mode 100644 debian/cinder-scheduler.init create mode 100644 debian/cinder-scheduler.install create mode 100644 debian/cinder-scheduler.logrotate create mode 100644 debian/cinder-scheduler.manpages create mode 100644 debian/cinder-scheduler.postinst create mode 100644 debian/cinder-scheduler.postrm create mode 100644 debian/cinder-volume.init create mode 100644 debian/cinder-volume.install create mode 100644 debian/cinder-volume.logrotate create mode 100644 debian/cinder-volume.manpages create mode 100644 debian/cinder-volume.postrm create mode 100644 debian/cinder.conf create mode 100644 debian/cinder_sudoers create mode 100644 debian/clean create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/logging.conf create mode 100644 debian/man/cinder-api.8 create mode 100644 debian/man/cinder-manage.8 create mode 100644 debian/man/cinder-rootwrap.8 create mode 100644 debian/man/cinder-scheduler.8 create mode 100644 debian/man/cinder-volume.8 create mode 100644 debian/python-cinder.install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..d3d140131 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,88 @@ +cinder (2012.2~f3-1) experimental; urgency=low + + * First debian release + + -- Mehdi Abaakouk Thu, 13 Sep 2012 15:52:06 +0200 + +cinder (2012.2~rc1~20120907.230-0ubuntu4) quantal; urgency=low + + [Chuck Short] + * New upstream version. + * debian/cinder.conf: Fix path for cinder-rootwrap. (LP: #1045438) + * debian/control: Add python-glanceclient as a dep. + * debian/cinder-common.postinst: Fix chmod thinko. + * debian/*.upstart: Specify the configuration files. + + [Soren Hansen] + * Update debian/watch to account for symbolically named tarballs and + use newer URL. + * Fix Launchpad URLs in debian/watch. + + -- Chuck Short Fri, 07 Sep 2012 11:27:55 -0500 + +cinder (2012.2~f3-0ubuntu3) quantal; urgency=low + + * debian/cinder.conf: Re-add sql_connection and set it to sqllite. + + -- Chuck Short Wed, 22 Aug 2012 20:14:41 -0500 + +cinder (2012.2~f3-0ubuntu2) quantal; urgency=low + + * debian/cinder.conf: Get rid of deprecated warnings. + (LP: #1036240) + + -- Chuck Short Sun, 19 Aug 2012 13:36:22 -0500 + +cinder (2012.2~f3-0ubuntu1) quantal; urgency=low + + * New upstream version. + * debian/patches/0001-Use-setuptools-git.patch: Dropped + * debian/control: Add python-glanceclient + + -- Chuck Short Fri, 17 Aug 2012 10:18:57 -0500 + +cinder (2012.2~f3~20120809.102-0ubuntu2) quantal; urgency=low + + * debian/cinder.conf, cinder-common.install: Use rootwrap.conf. (LP: #1036240) + * debian/control: Drop python-babel. + + -- Chuck Short Mon, 13 Aug 2012 14:14:31 -0500 + +cinder (2012.2~f3~20120809.102-0ubuntu1) quantal; urgency=low + + [ Adam Gandelman ] + * debian/control: Add python-setuptools dependency. + * debian/cinder-common.postinst: Fix syntax errors, fix permissions. + * debian/cinder-common.dirs: Correct, etc/nova -> etc/cinder. + * debian/{cinder_sudoers, rules, cinder-common.install}: Install proper + cinder_sudoers. + * debian/cinder-*.upstart: Close quotes, replace 'nova' references with + 'cinder'. + * debian/cinder.conf: Specify correct sql_connection. + * debian/cinder-scheduler.postinst: Added. Migrate local databases only. + + [ Chuck Short ] + * debian/*.upstart: Fix upstart jobs to run with right interfaces. + (LP: #1030197) + * debian/control: Drop python-babel, python-nosexcover + * debian/control: Add python-mox, pep8 + * debian/rules: Re-add get-orig-source + * debian/rules: Enable testsuite. + * debian/cinder.conf: Update config file. + * debian/cinder-{api,volumes,scheduler}.manpages: Add manpages. + * New upstream version. + * debian/rules: Don't run pep8 tests + * debian/patches/0001-Use-setuptools-git.patch: Cleanup manifest + * debian/control: Add python-setuptools-git + * debian/control: Add section for python-cinder + * fix lintian warnings and errors. + * debian/cinder-common.install: Remove clear_rabbit_queues since it + will conflict with nova installed. + + -- Chuck Short Fri, 10 Aug 2012 12:05:11 -0500 + +cinder (2012.2~f1~20120503.2-0ubuntu1) quantal; urgency=low + + * Initial release. + + -- Chuck Short Tue, 22 May 2012 09:57:46 -0400 diff --git a/debian/cinder-api.init b/debian/cinder-api.init new file mode 100644 index 000000000..739981c39 --- /dev/null +++ b/debian/cinder-api.init @@ -0,0 +1,116 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: cinder-api +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# 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 + +# 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="--configfile=/etc/cinder/cinder.conf" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +CINDER_USER=cinder +LOCK_DIR=/var/lock/cinder/ +DEFAULTS_FILE=/etc/default/cinder-common + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +mkdir -p ${LOCK_DIR} +chown ${CINDER_USER} ${LOCK_DIR} + +. /lib/lsb/init-functions + +# Read configuration variable file if it is present +if [ -s $DEFAULTS_FILE ]; then + . $DEFAULTS_FILE + case "x$CINDER_ENABLE" in + xtrue|xfalse) ;; + *) log_failure_msg "Value of CINDER_ENABLE in $DEFAULTS_FILE must be either 'true' or 'false';" + log_failure_msg "not starting $NAME daemon." + exit 1 + ;; + esac +fi + + +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) + if "$CINDER_ENABLE"; then + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + else + log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..." + fi + ;; + 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) + if "$CINDER_ENABLE"; then + 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 + else + log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..." + fi + ;; + + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/cinder-api.install b/debian/cinder-api.install new file mode 100644 index 000000000..98e58c1a9 --- /dev/null +++ b/debian/cinder-api.install @@ -0,0 +1 @@ +usr/bin/cinder-api diff --git a/debian/cinder-api.logrotate b/debian/cinder-api.logrotate new file mode 100644 index 000000000..6df00bf82 --- /dev/null +++ b/debian/cinder-api.logrotate @@ -0,0 +1,4 @@ +/var/log/cinder/cinder-api.log { + daily + missingok +} diff --git a/debian/cinder-api.manpages b/debian/cinder-api.manpages new file mode 100644 index 000000000..0cc348b20 --- /dev/null +++ b/debian/cinder-api.manpages @@ -0,0 +1 @@ +debian/man/cinder-api.8 diff --git a/debian/cinder-api.postrm b/debian/cinder-api.postrm new file mode 100644 index 000000000..f1fec48ed --- /dev/null +++ b/debian/cinder-api.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = purge ]; then + update-rc.d cinder-api remove +fi + +#DEBHELPER# diff --git a/debian/cinder-common.config b/debian/cinder-common.config new file mode 100644 index 000000000..a7c600744 --- /dev/null +++ b/debian/cinder-common.config @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +NOVA_COM_DEF=/etc/default/nova-common + +# Set the debconf value to whatever is in the config file +if [ -f ${NOVA_COM_DEF} ] ; then + . ${NOVA_COM_DEF} +fi +if ! [ "${NOVA_ENABLE}" = "true" ] ; then + NOVA_ENABLE=false +fi +db_set nova-common/start_services ${NOVA_ENABLE} + +db_input low nova-common/start_services || true +db_go + +# Write a default config file if it doesn't exist yet +# note that the value will be overwritten by the postinst +if ! [ -f ${NOVA_COM_DEF} ] ; then + echo "# defaults file for nova daemons + +# start nova daemons from init.d script? +# only allowed values are \"true\" and \"false\" +NOVA_ENABLE=true" >${NOVA_COM_DEF} +fi + diff --git a/debian/cinder-common.dirs b/debian/cinder-common.dirs new file mode 100644 index 000000000..990209e20 --- /dev/null +++ b/debian/cinder-common.dirs @@ -0,0 +1,4 @@ +etc/cinder +etc/cinder/rootwrap.d +var/lib/cinder +var/log/cinder diff --git a/debian/cinder-common.install b/debian/cinder-common.install new file mode 100644 index 000000000..6d744e2a7 --- /dev/null +++ b/debian/cinder-common.install @@ -0,0 +1,9 @@ +usr/bin/cinder-manage +usr/bin/cinder-rootwrap +etc/cinder/policy.json etc/cinder +etc/cinder/api-paste.ini etc/cinder +etc/cinder/rootwrap.d/volume.filters /etc/cinder/rootwrap.d +etc/cinder/rootwrap.conf etc/cinder +debian/cinder.conf etc/cinder +debian/logging.conf etc/cinder +debian/cinder_sudoers etc/sudoers.d diff --git a/debian/cinder-common.manpages b/debian/cinder-common.manpages new file mode 100644 index 000000000..23a27ccfb --- /dev/null +++ b/debian/cinder-common.manpages @@ -0,0 +1,2 @@ +debian/man/cinder-manage.8 +debian/man/cinder-rootwrap.8 diff --git a/debian/cinder-common.postinst b/debian/cinder-common.postinst new file mode 100644 index 000000000..2ac7870de --- /dev/null +++ b/debian/cinder-common.postinst @@ -0,0 +1,38 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + if ! getenv group cinder > /dev/null 2>&1; then + addgroup --system cinder >/dev/null + fi + + if ! getenv passwd cinder > /dev/null 2>&1; then + adduser --system --home /var/lib/cinder --ingroup cinder --no-create-home \ + --shell /bin/false cinder + fi + + chown -R cinder:adm /var/log/cinder + chmod 0750 /var/log/cinder + chown -R cinder:cinder /var/lib/cinder /etc/cinder + chmod 0750 /etc/cinder + chmod 0440 /etc/sudoers.d/cinder_sudoers + + if ! grep -q sql_connection /etc/cinder/cinder.conf + then + su -s /bin/sh -c 'cinder-manage db sync' cinder + fi + + if [ -e /var/lib/cinder/cinder.sqlite ]; then + chown cinder:cinder /var/lib/cinder/cinder.sqlite + chown 0600 /var/lib/cinder/cinder.sqlite + fi + + . /usr/share/debconf/confmodule + + db_get nova-common/start_services + if [ " $RET" = "false" ]; then + sed -e "s,^NOVA_ENABLE=.\+,NOVA_ENABLE=false," -i /etc/default/nova + fi + +fi + +#DEBHELPER# diff --git a/debian/cinder-scheduler.init b/debian/cinder-scheduler.init new file mode 100644 index 000000000..58b441875 --- /dev/null +++ b/debian/cinder-scheduler.init @@ -0,0 +1,116 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: cinder-scheduler +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# 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 + +# 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="--configfile=/etc/cinder/cinder.conf" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +CINDER_USER=cinder +LOCK_DIR=/var/lock/cinder/ +DEFAULTS_FILE=/etc/default/cinder-common + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +mkdir -p ${LOCK_DIR} +chown ${CINDER_USER} ${LOCK_DIR} + +. /lib/lsb/init-functions + +# Read configuration variable file if it is present +if [ -s $DEFAULTS_FILE ]; then + . $DEFAULTS_FILE + case "x$CINDER_ENABLE" in + xtrue|xfalse) ;; + *) log_failure_msg "Value of CINDER_ENABLE in $DEFAULTS_FILE must be either 'true' or 'false';" + log_failure_msg "not starting $NAME daemon." + exit 1 + ;; + esac +fi + + +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) + if "$CINDER_ENABLE"; then + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + else + log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..." + fi + ;; + 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) + if "$CINDER_ENABLE"; then + 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 + else + log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..." + fi + ;; + + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/cinder-scheduler.install b/debian/cinder-scheduler.install new file mode 100644 index 000000000..8d994a17a --- /dev/null +++ b/debian/cinder-scheduler.install @@ -0,0 +1 @@ +usr/bin/cinder-scheduler diff --git a/debian/cinder-scheduler.logrotate b/debian/cinder-scheduler.logrotate new file mode 100644 index 000000000..0d3a307d5 --- /dev/null +++ b/debian/cinder-scheduler.logrotate @@ -0,0 +1,4 @@ +/var/log/cinder/cinder-scheduler.log { + daily + missingok +} diff --git a/debian/cinder-scheduler.manpages b/debian/cinder-scheduler.manpages new file mode 100644 index 000000000..4d6e93c10 --- /dev/null +++ b/debian/cinder-scheduler.manpages @@ -0,0 +1 @@ +debian/man/cinder-scheduler.8 diff --git a/debian/cinder-scheduler.postinst b/debian/cinder-scheduler.postinst new file mode 100644 index 000000000..30bfd114b --- /dev/null +++ b/debian/cinder-scheduler.postinst @@ -0,0 +1,14 @@ +#!/bin/sh -e + +if [ "$1" = "configure" ]; then + # only migrate the database if configured to use a local sqlite db (default) + if grep -q 'sql_connection=sqlite' /etc/cinder/cinder.conf ; then + su -s /bin/sh -c 'cinder-manage db sync' cinder + fi + if [ -e /var/lib/cinder/cinder.sql ] ; then + chown cinder:cinder /var/lib/cinder/cinder.sqlite + chmod 0640 /var/lib/cinder/cinder.sqlite + fi +fi + +#DEBHELPER# diff --git a/debian/cinder-scheduler.postrm b/debian/cinder-scheduler.postrm new file mode 100644 index 000000000..920484132 --- /dev/null +++ b/debian/cinder-scheduler.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = purge ]; then + update-rc.d cinder-scheduler remove +fi + +#DEBHELPER# diff --git a/debian/cinder-volume.init b/debian/cinder-volume.init new file mode 100644 index 000000000..9999b309b --- /dev/null +++ b/debian/cinder-volume.init @@ -0,0 +1,116 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: cinder-volume +# Required-Start: $network $local_fs $remote_fs $syslog +# Required-Stop: $remote_fs +# 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 + +# 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="--configfile=/etc/cinder/cinder.conf" +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME +CINDER_USER=cinder +LOCK_DIR=/var/lock/cinder/ +DEFAULTS_FILE=/etc/default/cinder-common + +# Exit if the package is not installed +[ -x $DAEMON ] || exit 0 + +mkdir -p ${LOCK_DIR} +chown ${CINDER_USER} ${LOCK_DIR} + +. /lib/lsb/init-functions + +# Read configuration variable file if it is present +if [ -s $DEFAULTS_FILE ]; then + . $DEFAULTS_FILE + case "x$CINDER_ENABLE" in + xtrue|xfalse) ;; + *) log_failure_msg "Value of CINDER_ENABLE in $DEFAULTS_FILE must be either 'true' or 'false';" + log_failure_msg "not starting $NAME daemon." + exit 1 + ;; + esac +fi + + +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) + if "$CINDER_ENABLE"; then + log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac + else + log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..." + fi + ;; + 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) + if "$CINDER_ENABLE"; then + 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 + else + log_warning_msg "cinder daemons not enabled in $DEFAULTS_FILE, not starting..." + fi + ;; + + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/debian/cinder-volume.install b/debian/cinder-volume.install new file mode 100644 index 000000000..188598f81 --- /dev/null +++ b/debian/cinder-volume.install @@ -0,0 +1 @@ +usr/bin/cinder-volume diff --git a/debian/cinder-volume.logrotate b/debian/cinder-volume.logrotate new file mode 100644 index 000000000..b51433129 --- /dev/null +++ b/debian/cinder-volume.logrotate @@ -0,0 +1,4 @@ +/var/log/cinder/cinder-volume.log { + daily + missingok +} diff --git a/debian/cinder-volume.manpages b/debian/cinder-volume.manpages new file mode 100644 index 000000000..87e53e944 --- /dev/null +++ b/debian/cinder-volume.manpages @@ -0,0 +1 @@ +debian/man/cinder-volume.8 diff --git a/debian/cinder-volume.postrm b/debian/cinder-volume.postrm new file mode 100644 index 000000000..9667a99e6 --- /dev/null +++ b/debian/cinder-volume.postrm @@ -0,0 +1,7 @@ +#!/bin/sh -e + +if [ "$1" = purge ]; then + update-rc.d cinder-volume remove +fi + +#DEBHELPER# diff --git a/debian/cinder.conf b/debian/cinder.conf new file mode 100644 index 000000000..143ecacb7 --- /dev/null +++ b/debian/cinder.conf @@ -0,0 +1,9 @@ +[DEFAULT] +rootwrap_config = sudo /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf +sql_connection = sqlite:////var/lib/cinder/cinder.sqlite +api_paste_confg = /etc/cinder/api-paste.ini +icssi_helper = tgtadm +volume_name_template = volume-%s +volume_group = cinder-volumes +verbose = True +auth_strategy = keystone diff --git a/debian/cinder_sudoers b/debian/cinder_sudoers new file mode 100644 index 000000000..73142ab4e --- /dev/null +++ b/debian/cinder_sudoers @@ -0,0 +1,3 @@ +Defaults:cinder !requiretty + +cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap diff --git a/debian/clean b/debian/clean new file mode 100644 index 000000000..e932b028c --- /dev/null +++ b/debian/clean @@ -0,0 +1 @@ +setup.cfg diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..45a4fb75d --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +8 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..578261f2e --- /dev/null +++ b/debian/control @@ -0,0 +1,103 @@ +Source: cinder +Section: net +Priority: extra +Maintainer: PKG OpenStack +Uploaders: Mehdi Abaakouk +Build-Depends: debhelper (>= 8.0.0), + python-all (>= 2.6), + python-all-dev (>= 2.6.6-3~) +Build-Depends-Indep: + python-sqlalchemy, + python-setuptools, + python-cheetah, + python-amqplib, + python-anyjson, + python-eventlet, + python-kombu, + python-lockfile, + python-lxml, + python-daemon, + python-routes, + python-webob, + python-greenlet, + python-glanceclient, + python-pastedeploy, + python-paste, + python-migrate, + python-netaddr, + python-glance, + python-suds, + python-paramiko, + python-iso8601, + python-coverage, + python-mox, + python-nose, + python-sphinx, + python-mysqldb, + python-setuptools-git, + pep8, +Standards-Version: 3.9.3 +Homepage: http://launchpad.net/cinder + +Package: python-cinder +Section: python +Architecture: all +Depends: ${python:Depends}, python-sqlalchemy, + python-cheetah, + python-amqplib, + python-anyjson, + python-eventlet, + python-kombu, + python-lockfile, + python-lxml, + python-daemon, + python-routes, + python-webob, + python-greenlet, + python-pastedeploy, + python-paste, + python-migrate, + python-netaddr, + python-glance, + python-suds, + python-paramiko, + python-iso8601, + python-glanceclient, + ${misc:Depends} +Description: Cinder python libraries + Cinder is a storage service for the Openstack project. + . + This package contains the proython parts of cinder. + +Package: cinder-common +Architecture: all +Depends: python-cinder (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, adduser +Provides: ${python:Provides} +Description: Cinder starage service - common files + Cinder is a storage service for the Openstack project + . + This package contains things that are needed for all parts of cinder + +Package: cinder-api +Architecture: all +Depends: cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends} +Description: Cinder storage service - api server + Cinder is a storage service for the Openstack project + . + This package contains the api server + +Package: cinder-volume +Architecture: all +Depends: cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends} +Description: Cinder storage service - api server + Cinder is a storage service for the Openstack project + . + This package contains the volume server + +Package: cinder-scheduler +Architecture: all +Depends: cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends} +Description: Cinder storage service - api server + Cinder is a storage service for the Openstack project + . + This package contains the scheduler server diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..ab9fa2330 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,26 @@ +Format: http://dep.debian.net/deps/dep5- +Upstream-Name: nova +Source: https://code.launchpad.net/nova + +Files: * +Copyright: 2010 United States Government as represented + by the Administrator of the National Aeronautics + and Space Administration. +Copyright: 2010 OpenStack LLC +Copyright: Others (See individual files for more details) +License: Apache-2 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian-based systems the full text of the Apache version 2.0 license + can be found in `/usr/share/common-licenses/Apache-2.0'. + diff --git a/debian/docs b/debian/docs new file mode 100644 index 000000000..a1320b1b4 --- /dev/null +++ b/debian/docs @@ -0,0 +1 @@ +README.rst diff --git a/debian/logging.conf b/debian/logging.conf new file mode 100644 index 000000000..476425b8b --- /dev/null +++ b/debian/logging.conf @@ -0,0 +1,76 @@ +[loggers] +keys = root, cinder + +[handlers] +keys = stderr, stdout, watchedfile, syslog, null + +[formatters] +keys = legacycinder, default + +[logger_root] +level = WARNING +handlers = null + +[logger_cinder] +level = INFO +handlers = stderr +qualname = cinder + +[logger_amqplib] +level = WARNING +handlers = stderr +qualname = amqplib + +[logger_sqlalchemy] +level = WARNING +handlers = stderr +qualname = sqlalchemy +# "level = INFO" logs SQL queries. +# "level = DEBUG" logs SQL queries and results. +# "level = WARNING" logs neither. (Recommended for production systems.) + +[logger_boto] +level = WARNING +handlers = stderr +qualname = boto + +[logger_suds] +level = INFO +handlers = stderr +qualname = suds + +[logger_eventletwsgi] +level = WARNING +handlers = stderr +qualname = eventlet.wsgi.server + +[handler_stderr] +class = StreamHandler +args = (sys.stderr,) +formatter = legacycinder + +[handler_stdout] +class = StreamHandler +args = (sys.stdout,) +formatter = legacycinder + +[handler_watchedfile] +class = handlers.WatchedFileHandler +args = ('cinder.log',) +formatter = legacycinder + +[handler_syslog] +class = handlers.SysLogHandler +args = ('/dev/log', handlers.SysLogHandler.LOG_USER) +formatter = legacycinder + +[handler_null] +class = cinder.log.NullHandler +formatter = default +args = () + +[formatter_legacycinder] +class = cinder.log.LegacyCinderFormatter + +[formatter_default] +format = %(message)s diff --git a/debian/man/cinder-api.8 b/debian/man/cinder-api.8 new file mode 100644 index 000000000..e3f870e14 --- /dev/null +++ b/debian/man/cinder-api.8 @@ -0,0 +1,20 @@ +.TH cinder\-api 8 +.SH NAME +cinder\-api \- frontend API server for cinder + +.SH SYNOPSIS +.B cinder\-api +.B \-\-config-file= + +.SH DESCRIPTION +.B cinder\-api + +This man page is a stub. Please contribute. + +.SH PARAMETERS + +.LP +.B \-\-config-file= +.IP + +Path to the file containing options. diff --git a/debian/man/cinder-manage.8 b/debian/man/cinder-manage.8 new file mode 100644 index 000000000..687bb7b84 --- /dev/null +++ b/debian/man/cinder-manage.8 @@ -0,0 +1,21 @@ +.TH cinder\-manage 8 +.SH NAME +cinder\-manage \- manages the cinder daemons + +.SH SYNOPSIS +.B cinder\-manage +.B + +.SH DESCRIPTION +.B cinder\-manage + +This man page is a stub. Please contribute. + +.SH PARAMETERS + +.LP +.B +.IP + +cinder-manage.8 (END) + diff --git a/debian/man/cinder-rootwrap.8 b/debian/man/cinder-rootwrap.8 new file mode 100644 index 000000000..94d7f293c --- /dev/null +++ b/debian/man/cinder-rootwrap.8 @@ -0,0 +1,22 @@ +.TH cinder\-rootwrap 8 +.SH NAME +cinder\-rootwrap \- Authorizes and executes sudo commands on cinder's behalf + +.SH SYNOPSIS +.B cinder\-rootwrap +.B + +.SH DESCRIPTION +.B cinder\-rootwrap + +This man page is a stub. Please contribute. + +.SH PARAMETERS + +.LP +.B +.IP + +Command to be executed with sudo +cinder-rootwrap.8 (END) + diff --git a/debian/man/cinder-scheduler.8 b/debian/man/cinder-scheduler.8 new file mode 100644 index 000000000..e3f870e14 --- /dev/null +++ b/debian/man/cinder-scheduler.8 @@ -0,0 +1,20 @@ +.TH cinder\-api 8 +.SH NAME +cinder\-api \- frontend API server for cinder + +.SH SYNOPSIS +.B cinder\-api +.B \-\-config-file= + +.SH DESCRIPTION +.B cinder\-api + +This man page is a stub. Please contribute. + +.SH PARAMETERS + +.LP +.B \-\-config-file= +.IP + +Path to the file containing options. diff --git a/debian/man/cinder-volume.8 b/debian/man/cinder-volume.8 new file mode 100644 index 000000000..e3f870e14 --- /dev/null +++ b/debian/man/cinder-volume.8 @@ -0,0 +1,20 @@ +.TH cinder\-api 8 +.SH NAME +cinder\-api \- frontend API server for cinder + +.SH SYNOPSIS +.B cinder\-api +.B \-\-config-file= + +.SH DESCRIPTION +.B cinder\-api + +This man page is a stub. Please contribute. + +.SH PARAMETERS + +.LP +.B \-\-config-file= +.IP + +Path to the file containing options. diff --git a/debian/python-cinder.install b/debian/python-cinder.install new file mode 100644 index 000000000..036c6b9db --- /dev/null +++ b/debian/python-cinder.install @@ -0,0 +1 @@ +usr/lib/python*/dist-packages/* diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..97219c2db --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ --with python2 + +get-orig-source: + uscan --verbose --force-download --rename --destdir=../build-area + +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) +override_dh_auto_test: + ./run_tests.sh -N -P || true +endif diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/watch b/debian/watch new file mode 100644 index 000000000..2f1457415 --- /dev/null +++ b/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/%7E/~/" https://launchpad.net/cinder/+download https://launchpad.net/cinder/.*/.*/.*/cinder-(.*)\.tar\.gz +http://tarballs.openstack.org/cinder/ cinder-(\d.*).tar.gz