]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Updates for packaging Grizzly-2
authorThomas Goirand <thomas@goirand.fr>
Mon, 28 Jan 2013 08:48:35 +0000 (16:48 +0800)
committerThomas Goirand <thomas@goirand.fr>
Mon, 28 Jan 2013 08:52:04 +0000 (16:52 +0800)
(cherry picked from commit f3139817265aa0684018e404a87373d8163a64a6)

Rewritten-From: 7f33191f3e2faf405b8ba37e6c5071031495aad3

15 files changed:
xenial/debian/README.Debian [new file with mode: 0644]
xenial/debian/cinder-api.logrotate
xenial/debian/cinder-common.postinst.in
xenial/debian/cinder-scheduler.logrotate
xenial/debian/cinder-volume.dirs [new file with mode: 0644]
xenial/debian/cinder-volume.install
xenial/debian/cinder-volume.logrotate
xenial/debian/cinder-volume.postinst.in [new file with mode: 0644]
xenial/debian/cinder.conf
xenial/debian/cinder_sudoers [new file with mode: 0644]
xenial/debian/cinder_tgt.conf [new file with mode: 0644]
xenial/debian/clean [new file with mode: 0644]
xenial/debian/control
xenial/debian/pydist-overrides [new file with mode: 0644]
xenial/debian/rules

diff --git a/xenial/debian/README.Debian b/xenial/debian/README.Debian
new file mode 100644 (file)
index 0000000..0a7d689
--- /dev/null
@@ -0,0 +1,10 @@
+Migration from nova-volumes to cinder-volumes:
+
+1. upgrade your nova install to folsom
+2. upgrade your nova database using nova-manage db sync
+3. install the folsom version of cinder
+4. create a cinder database using cinder-manage db sync
+5. copy data from nova database using cinder-manage migrate import_db --src=$NOVA_SQL_CONN --dest=$CINDER_SQL_CONN
+6. disable the nova-volume-api in enabled apis in /etc/nova/nova.conf sed -i "s/osapi_volume,// /etc/nova/nova.conf"
+7. restart nova-api
+8. start cinder-api
index 6df00bf82f1f1af42e5967985d5989f7f7b6ca6a..9b966d77b720b35da343e2b234ba33aa52a1aee8 100644 (file)
@@ -1,4 +1,7 @@
 /var/log/cinder/cinder-api.log {
        daily
        missingok
+       compress 
+       delaycompress
+       notifempty
 }
index 4be0710fb3e2228caa6d315e8eb93e1f74c3e54e..0f6484cb09a8051057c8cacec2772b3dd5e3770d 100644 (file)
@@ -14,6 +14,7 @@ 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
+       chown root:root /etc/cinder/rootwrap.d/volume.filters
        pkgos_dbc_postinst ${CINDER_CONF} cinder DEFAULT sql_connection $@
        pkgos_write_admin_creds ${CINDER_API} cinder filter:authtoken
        db_get cinder/volume_group
index 0d3a307d56d77aad0e2e90e5d201fadd768f19dc..15602c3b62b13c47f22fb27f77b2ae793ba9f08b 100644 (file)
@@ -1,4 +1,7 @@
 /var/log/cinder/cinder-scheduler.log {
        daily
        missingok
+       compress 
+       delaycompress
+       notifempty
 }
diff --git a/xenial/debian/cinder-volume.dirs b/xenial/debian/cinder-volume.dirs
new file mode 100644 (file)
index 0000000..7699139
--- /dev/null
@@ -0,0 +1 @@
+var/lib/cinder/volumes
index 188598f816f4b68c7893221da1031c98e408c839..267af421f96cba0f904722fee0fdca580418ccaf 100644 (file)
@@ -1 +1,2 @@
 usr/bin/cinder-volume
+debian/cinder_tgt.conf etc/tgt/conf.d
index b514331299c6930f8eddbce10325d1bfa2d1d8ba..f3bb6b47337d910fe31132d396896ee0a30442b3 100644 (file)
@@ -1,4 +1,7 @@
 /var/log/cinder/cinder-volume.log {
        daily
        missingok
+       compress 
+       delaycompress
+       notifempty
 }
diff --git a/xenial/debian/cinder-volume.postinst.in b/xenial/debian/cinder-volume.postinst.in
new file mode 100644 (file)
index 0000000..4248420
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -e
+
+#PKGOS-INCLUDE#
+
+if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ] ; then
+       pkgos_var_user_group cinder
+       chmod 0750 /var/lib/cinder/volumes
+       chown root:root /etc/cinder/rootwrap.d/volume.filters
+
+       if which invoke-rc.d >/dev/null 2>&1; then
+               invoke-rc.d tgtd restart > /dev/null 2>&1 || true
+       else
+               /etc/init.d/tgtd restart > /dev/null 2>&1 || true
+       fi
+fi
+
+#DEBHELPER#
+
+exit 0
index 82604abe3ebbecff322e8dcb62aa18bf6ff25a5b..a116a7e208da0d3aedea46d24042317d61d2d1f9 100644 (file)
@@ -10,3 +10,4 @@ auth_strategy = keystone
 logdir = /var/log/cinder
 state_path=/var/lib/cinder
 lock_path=/var/lock/cinder
+volumes_dir = /var/lib/cinder/volumes
diff --git a/xenial/debian/cinder_sudoers b/xenial/debian/cinder_sudoers
new file mode 100644 (file)
index 0000000..73142ab
--- /dev/null
@@ -0,0 +1,3 @@
+Defaults:cinder !requiretty
+
+cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap 
diff --git a/xenial/debian/cinder_tgt.conf b/xenial/debian/cinder_tgt.conf
new file mode 100644 (file)
index 0000000..444eb00
--- /dev/null
@@ -0,0 +1 @@
+include /var/lib/cinder/volumes/*
diff --git a/xenial/debian/clean b/xenial/debian/clean
new file mode 100644 (file)
index 0000000..e932b02
--- /dev/null
@@ -0,0 +1 @@
+setup.cfg
index a7169e3985f5858ddc696cab207e504f8623b517..5a430005239c81b81c962f3dbabfad57abb353cb 100644 (file)
@@ -22,6 +22,7 @@ Build-Depends-Indep: pep8,
  python-glanceclient,
  python-greenlet,
  python-iso8601,
+ python-keystoneclient,
  python-kombu,
  python-lockfile,
  python-lxml,
@@ -38,6 +39,7 @@ Build-Depends-Indep: pep8,
  python-setuptools-git,
  python-sphinx,
  python-sqlalchemy,
+ python-stevedore (>= 0.7),
  python-suds,
  python-webob,
 Standards-Version: 3.9.3
@@ -55,7 +57,6 @@ Depends: ${python:Depends},
  python-cheetah, 
  python-daemon,  
  python-eventlet,
- python-glance,
  python-glanceclient,
  python-greenlet,
  python-iso8601,
@@ -67,6 +68,8 @@ Depends: ${python:Depends},
  python-paramiko,
  python-paste,
  python-pastedeploy,
+ python-migrate,
+ python-netaddr,
  python-routes,
  python-suds,
  python-sqlalchemy,
@@ -112,7 +115,8 @@ Description: Openstack block storage as a service - API server
 Package: cinder-volume
 Architecture: all
 Pre-Depends: dpkg (>= 1.15.6~)
-Depends: ${ostack-lsb-base}, cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends}
+Depends: ${ostack-lsb-base}, cinder-common (= ${binary:Version}), ${python:Depends}, ${misc:Depends},
+ lvm2, tgt
 Description: Openstack block storage as a service - Volume server
  Cinder is a block storage as service system for the Openstack cloud computing
  software suite. It is a direct replacement for nova-volume as a separate
diff --git a/xenial/debian/pydist-overrides b/xenial/debian/pydist-overrides
new file mode 100644 (file)
index 0000000..98f6593
--- /dev/null
@@ -0,0 +1 @@
+babel
index 5b24d6dabc94fbf78ced22dee121d8f29cfc1c4b..88f9bedae5ead447f126770d12081c24f3d0808b 100755 (executable)
@@ -12,14 +12,14 @@ endif
 
 override_dh_clean:
        dh_clean
-       rm -f debian/cinder-common.config debian/cinder-common.postinst debian/cinder-api.config debian/cinder-api.postinst
+       rm -f debian/cinder-common.config debian/cinder-common.postinst debian/cinder-api.config debian/cinder-api.postinst debian/cinder-volume.postinst
 
 override_dh_install:
        dh_install
        install -D -m 0440 debian/cinder-common.sudoers $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
 
 override_dh_fixperms:
-       dh_fixperms
+       dh_fixperms -Xcinder_tgt.conf
        chmod 0440 $(CURDIR)/debian/cinder-common/etc/sudoers.d/cinder-common
 
 override_dh_auto_build:
@@ -29,3 +29,4 @@ override_dh_auto_build:
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-common.postinst
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-api.config
        /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-api.postinst
+       /usr/share/openstack-pkg-tools/pkgos_insert_include pkgos_func cinder-volume.postinst