]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
* Now asking for Keystone credentials using the new pkg_os function.
authorThomas Goirand <thomas@goirand.fr>
Fri, 26 Oct 2012 15:31:24 +0000 (15:31 +0000)
committerThomas Goirand <thomas@goirand.fr>
Fri, 26 Oct 2012 16:08:25 +0000 (16:08 +0000)
* Patches api-paste.ini for syntax.

debian/changelog
debian/cinder-common.config.in
debian/cinder-common.install
debian/cinder-common.postinst.in
debian/cinder-common.postrm
debian/cinder-common.templates
debian/patches/fix-api-paste.ini-syntax.patch [new file with mode: 0644]
debian/patches/series

index 4c863ad0174ec7a139bf5b69bc175381e071619d..9b9c0e68b2cc99bb1178ca3e6490bf68687cd26b 100644 (file)
@@ -17,6 +17,8 @@ cinder (2012.2-1) experimental; urgency=low
   * Removed useless empty cinder-volume.postrm, cinder-api.postrm,
   cinder-scheduler.postinst, cinder-scheduler.postrm.
   * 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.
 
  -- Mehdi Abaakouk <sileht@sileht.net>  Sat, 29 Sep 2012 09:23:22 +0200
 
index f8b7570e6c15db7be473ee804f96f3fdb1faebe2..43c31f7d20c991fa5691d574471abdad64fd7ba0 100644 (file)
@@ -5,6 +5,7 @@ set -e
 . /usr/share/debconf/confmodule
 CINDER_COM_DEF=/etc/default/cinder-common
 CINDER_CONF=/etc/cinder/cinder.conf
+CINDER_API=/etc/cinder/api-paste.ini
 
 #PKGOS-INCLUDE#
 
@@ -25,5 +26,7 @@ CINDER_ENABLE=${CINDER_ENABLE}" >${CINDER_COM_DEF}
 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
 
 exit 0
index 484de9fb73418fc843517517fc762b7214004ed0..c0e2f1028523d2c9a13624ff21aff8e79b3123ca 100644 (file)
@@ -1,8 +1,8 @@
 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 usr/share/cinder-common
-debian/logging.conf etc/cinder
+etc/cinder/policy.json                 /etc/cinder
+debian/logging.conf                    /etc/cinder
+etc/cinder/rootwrap.conf               /etc/cinder
+etc/cinder/rootwrap.d/volume.filters   /etc/cinder/rootwrap.d
+debian/cinder.conf                     /usr/share/cinder-common
+etc/cinder/api-paste.ini               /usr/share/cinder-common
index df75c7391eb31bdf1a118f3b0fcc12238a0b5ec9..2cb112c3d7dea3c9c3a3828b325e0841364f9802 100644 (file)
@@ -1,8 +1,10 @@
 #!/bin/sh
 
 set -e
+set -x
 
 CINDER_CONF=/etc/cinder/cinder.conf
+CINDER_API=/etc/cinder/api-paste.ini
 
 #PKGOS-INCLUDE#
 
@@ -12,7 +14,9 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
 
        pkgos_var_user_group cinder
        pkgos_write_new_conf cinder cinder.conf
+       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
 
        chmod 0440 /etc/sudoers.d/cinder-common
        echo "Now calling cinder-manage db sync: this may take a while..."
index 365f34c3e659cea4698645bb3f63c483dbdcaec9..aabb325edf4916421e89b3a0fc1cb5195c6d12cc 100644 (file)
@@ -21,7 +21,7 @@ if [ "$1" = "purge" ] && [ -f /usr/share/debconf/confmodule ] ; then
                fi
        fi
 
-       rm -f /etc/cinder/cinder.conf
+       rm -f /etc/cinder/cinder.conf /etc/cinder/api-paste.ini
        rmdir --ignore-fail-on-non-empty /etc/cinder
        rm -f /etc/default/cinder-common
        rm -rf /var/lib/cinder /var/log/cinder
index 367e7c105ce31358897d51602305d08b47c0e788..c98741f87740b841bea126a71875edea01bf99ad 100644 (file)
@@ -23,3 +23,24 @@ _Description: Set up a database for Cinder?
  .
  You can change this setting later on by running "dpkg-reconfigure
  -plow cinder-common".
+
+Template: cinder/auth-host
+Type: string
+Default: 127.0.0.1
+_Description: Auth server hostname:
+ Please specify the URL of your Cinder authentication server. Typically 
+ this is also the URL of your OpenStack Identity Service (Keystone).
+
+Template: cinder/admin-tenant-name
+Type: string
+Default: admin
+_Description: Auth server tenant name:
+
+Template: cinder/admin-user
+Type: string
+Default: admin
+_Description: Auth server username:
+
+Template: cinder/admin-password
+Type: password
+_Description: Auth server password:
diff --git a/debian/patches/fix-api-paste.ini-syntax.patch b/debian/patches/fix-api-paste.ini-syntax.patch
new file mode 100644 (file)
index 0000000..a7ec428
--- /dev/null
@@ -0,0 +1,17 @@
+Description: Fixes api-paste.ini syntax so it is really a .ini file
+Author: Thomas Goirand <zigo@debian.org>
+Forwarded: no
+
+--- cinder-2012.2.orig/etc/cinder/api-paste.ini
++++ cinder-2012.2/etc/cinder/api-paste.ini
+@@ -4,8 +4,8 @@
+ [composite:osapi_volume]
+ use = call:cinder.api.openstack.urlmap:urlmap_factory
+-/: osvolumeversions
+-/v1: openstack_volume_api_v1
++/ = osvolumeversions
++/v1 = openstack_volume_api_v1
+ [composite:openstack_volume_api_v1]
+ use = call:cinder.api.auth:pipeline_factory
index 25c0f244e6c3528dd5e85c9e11d2537f261ba6ad..a144c7af4f45b7cfa049e9affb33a597393de3ab 100644 (file)
@@ -1 +1,2 @@
 install-missing-files.patch
+fix-api-paste.ini-syntax.patch