* Pre-Depends: dpkg (>= 1.15.6~) because we use xz compression.
* Asks for admin tenant, user and password with debconf, patches
api-paste.ini so it is syntaxicaly correct.
+ * Auto-detects a valide volume group name, and prompt the user with debconf
+ about it.
-- Mehdi Abaakouk <sileht@sileht.net> Sat, 29 Sep 2012 09:23:22 +0200
pkgos_var_user_group cinder
manage_cinder_enable
pkgos_dbc_read_conf ${CINDER_CONF} cinder DEFAULT sql_connection $@
-set -x
pkgos_read_admin_creds ${CINDER_API} cinder filter:authtoken
+pkgos_get_config ${CINDER_CONF} volume_group DEFAULT
+if [ -n "${RET}" ] ; then
+ db_set cinder/volume_group "${RET}"
+else
+ db_get cinder/volume_group
+ if [ -z "${RET}" ] && [ -x /sbin/vgdisplay ] ; then
+ # Since we have no prior value, try to guess it from vgdisplay
+ VGDISP=`vgdisplay -c | head -n 1`
+ if [ -n "${VGDISP}" ] ; then
+ VGNAME=`echo ${VGDISP} | cut -d: -f1`
+ db_set cinder/volume_group ${VGNAME}
+ fi
+ fi
+fi
+db_input high cinder/volume_group || true
+db_go
+
exit 0
pkgos_write_new_conf cinder api-paste.ini
pkgos_dbc_postinst ${CINDER_CONF} cinder DEFAULT sql_connection $@
pkgos_write_admin_creds ${CINDER_API} cinder filter:authtoken
+ db_get cinder/volume_group
+ if [ -n "${RET}" ] ; then
+ pkgos_edit_config volume_group ${RET} ${CINDER_CONF} DEFAULT
+ fi
+
+ db_stop
chmod 0440 /etc/sudoers.d/cinder-common
echo "Now calling cinder-manage db sync: this may take a while..."
if [ -f /usr/share/debconf/confmodule ] ; then
. /usr/share/debconf/confmodule
- db_get cinder/configure_db
+ db_get cinder/configure_db || true
if [ "$RET" = "true" ]; then
if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then
. /usr/share/dbconfig-common/dpkg/postrm
. /usr/share/debconf/confmodule
-db_get cinder/configure_db
+db_get cinder/configure_db || true
if [ "$RET" = "true" ]; then
. /usr/share/dbconfig-common/dpkg/prerm
dbc_go cinder-common $@
Template: cinder/admin-password
Type: password
_Description: Auth server password:
+
+Template: cinder/volume_group
+Type: string
+_Description: Cinder volume group:
+ Please specify the name of the LVM volume group (vg) on which Cinder
+ will create partitions.
msgstr ""
"Project-Id-Version: cinder\n"
"Report-Msgid-Bugs-To: cinder@packages.debian.org\n"
-"POT-Creation-Date: 2012-09-17 09:47+0200\n"
+"POT-Creation-Date: 2012-11-01 16:43+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"You can change this setting later on by running \"dpkg-reconfigure -plow "
"cinder-common\"."
msgstr ""
+
+#. Type: string
+#. Description
+#: ../cinder-common.templates:3001
+msgid "Auth server hostname:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../cinder-common.templates:3001
+msgid ""
+"Please specify the URL of your Cinder authentication server. Typically this "
+"is also the URL of your OpenStack Identity Service (Keystone)."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../cinder-common.templates:4001
+msgid "Auth server tenant name:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../cinder-common.templates:5001
+msgid "Auth server username:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../cinder-common.templates:6001
+msgid "Auth server password:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../cinder-common.templates:7001
+msgid "Cinder volume group:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../cinder-common.templates:7001
+msgid ""
+"Please specify the name of the LVM volume group (vg) on which Cinder will "
+"create partitions."
+msgstr ""