From: Thomas Goirand Date: Mon, 28 Jan 2013 08:48:35 +0000 (+0800) Subject: Updates for packaging Grizzly-2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=84e9252e14a71b737f2765837cef8076e530f231;p=openstack-build%2Fcinder-build.git Updates for packaging Grizzly-2 (cherry picked from commit f3139817265aa0684018e404a87373d8163a64a6) Rewritten-From: 7f33191f3e2faf405b8ba37e6c5071031495aad3 --- diff --git a/xenial/debian/README.Debian b/xenial/debian/README.Debian new file mode 100644 index 000000000..0a7d689f3 --- /dev/null +++ b/xenial/debian/README.Debian @@ -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 diff --git a/xenial/debian/cinder-api.logrotate b/xenial/debian/cinder-api.logrotate index 6df00bf82..9b966d77b 100644 --- a/xenial/debian/cinder-api.logrotate +++ b/xenial/debian/cinder-api.logrotate @@ -1,4 +1,7 @@ /var/log/cinder/cinder-api.log { daily missingok + compress + delaycompress + notifempty } diff --git a/xenial/debian/cinder-common.postinst.in b/xenial/debian/cinder-common.postinst.in index 4be0710fb..0f6484cb0 100644 --- a/xenial/debian/cinder-common.postinst.in +++ b/xenial/debian/cinder-common.postinst.in @@ -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 diff --git a/xenial/debian/cinder-scheduler.logrotate b/xenial/debian/cinder-scheduler.logrotate index 0d3a307d5..15602c3b6 100644 --- a/xenial/debian/cinder-scheduler.logrotate +++ b/xenial/debian/cinder-scheduler.logrotate @@ -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 index 000000000..769913906 --- /dev/null +++ b/xenial/debian/cinder-volume.dirs @@ -0,0 +1 @@ +var/lib/cinder/volumes diff --git a/xenial/debian/cinder-volume.install b/xenial/debian/cinder-volume.install index 188598f81..267af421f 100644 --- a/xenial/debian/cinder-volume.install +++ b/xenial/debian/cinder-volume.install @@ -1 +1,2 @@ usr/bin/cinder-volume +debian/cinder_tgt.conf etc/tgt/conf.d diff --git a/xenial/debian/cinder-volume.logrotate b/xenial/debian/cinder-volume.logrotate index b51433129..f3bb6b473 100644 --- a/xenial/debian/cinder-volume.logrotate +++ b/xenial/debian/cinder-volume.logrotate @@ -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 index 000000000..42484208c --- /dev/null +++ b/xenial/debian/cinder-volume.postinst.in @@ -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 diff --git a/xenial/debian/cinder.conf b/xenial/debian/cinder.conf index 82604abe3..a116a7e20 100644 --- a/xenial/debian/cinder.conf +++ b/xenial/debian/cinder.conf @@ -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 index 000000000..73142ab4e --- /dev/null +++ b/xenial/debian/cinder_sudoers @@ -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 index 000000000..444eb00e4 --- /dev/null +++ b/xenial/debian/cinder_tgt.conf @@ -0,0 +1 @@ +include /var/lib/cinder/volumes/* diff --git a/xenial/debian/clean b/xenial/debian/clean new file mode 100644 index 000000000..e932b028c --- /dev/null +++ b/xenial/debian/clean @@ -0,0 +1 @@ +setup.cfg diff --git a/xenial/debian/control b/xenial/debian/control index a7169e398..5a4300052 100644 --- a/xenial/debian/control +++ b/xenial/debian/control @@ -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 index 000000000..98f65931c --- /dev/null +++ b/xenial/debian/pydist-overrides @@ -0,0 +1 @@ +babel diff --git a/xenial/debian/rules b/xenial/debian/rules index 5b24d6dab..88f9bedae 100755 --- a/xenial/debian/rules +++ b/xenial/debian/rules @@ -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