%global with_doc %{!?_without_doc:1}%{?_without_doc:0}
Name: openstack-cinder
-Version: 2014.2
-Release: 2%{?dist}
+Epoch: 1
+Version: 7.0.0.0rc1
+Release: 1%{?dist}~mos8.0.1
Summary: OpenStack Volume service
Group: Applications/System
License: ASL 2.0
URL: http://www.openstack.org/software/openstack-storage/
-Source0: https://launchpad.net/cinder/icehouse/2014.1/+download/cinder-%{version}.tar.gz
+Source0: cinder-%{version}.tar.gz
Source1: cinder-dist.conf
Source2: cinder.logrotate
Source3: cinder-tgt.conf
Source12: openstack-cinder-volume.init
Source13: openstack-cinder-backup.init
Source14: cinder.conf.sample
-Source15: openstack-cinder-volume-vmware.init
+
+Source30: openstack-cinder-api.service
+Source31: openstack-cinder-scheduler.service
+Source32: openstack-cinder-volume.service
+Source33: openstack-cinder-backup.service
Source20: cinder-sudoers
BuildRequires: python-sphinx
BuildRequires: python-setuptools
BuildRequires: python-netaddr >= 0.7.12
+BuildRequires: python-stevedore
-Requires: openstack-utils
-Requires: python-cinder = %{version}-%{release}
+#Requires: openstack-utils
+Requires: python-cinder = 1:%{version}-%{release}
# as convenience
Requires: python-cinderclient
Requires(pre): shadow-utils
Requires: lvm2
-Requires: scsi-target-utils
+#Requires: scsi-target-utils
+Requires: iscsi-initiator-utils
%description
OpenStack Volume (codename Cinder) provides services to manage and
Requires: qemu-img
Requires: sysfsutils
-Requires: python-pbr >= 0.6, python-pbr < 0.7, python-pbr > 0.7, python-pbr < 1.0
+Requires: python-pbr >= 1.6
Requires: python-anyjson >= 0.3.3
Requires: python-argparse
Requires: python-babel >= 1.3
-Requires: python-eventlet >= 0.15.2
+Requires: python-enum34
+Requires: python-eventlet >= 0.17.4
Requires: python-greenlet >= 0.3.2
Requires: python-iso8601 >= 0.1.9
-Requires: python-keystonemiddleware >= 1.0.0
-Requires: python-kombu >= 2.5.0
+Requires: python-keystoneclient >= 1:1.6.0
+Requires: python-keystonemiddleware >= 2.0.0
+Requires: python-kombu >= 3.0.7
Requires: python-lxml >= 2.3
Requires: python-netaddr >= 0.7.12
-Requires: python-oslo-config >= 1:1.4.0
-Requires: python-oslo.concurrency >= 0.3.0
-Requires: python-oslo-db >= 1.1.0
-Requires: python-oslo-messaging >= 1.4.0, python-oslo.messaging < 1.5.0, python-oslo.messaging > 1.5.0
-Requires: python-oslo-rootwrap >= 1.3.0
-Requires: python-oslo.serialization >= 1.0.0
-Requires: python-oslo.utils >= 1.0.0
+Requires: python-oslo-config >= 1:2.3.0
+Requires: python-oslo-concurrency >= 2.3.0
+Requires: python-oslo-context >= 0.2.0
+Requires: python-oslo-db >= 2.4.1
+Requires: python-oslo-log >= 1.8.0
+Requires: python-oslo-messaging >= 1.16.0
+Requires: python-oslo-middleware >= 2.8.0
+Requires: python-oslo-policy >= 0.5.0
+Requires: python-oslo-reports >= 0.1.0
+Requires: python-oslo-rootwrap >= 2.0.0
+Requires: python-oslo-serialization >= 1.4.0
+Requires: python-oslo-utils >= 2.0.0
+Requires: python-oslo-versionedobjects >= 0.9.0
Requires: python-osprofiler >= 0.3.0
Requires: python-paramiko >= 1.13.0
+Requires: python-paste
Requires: python-paste-deploy >= 1.5.0
Requires: python-crypto >= 2.6
-Requires: python-barbicanclient >= 2.1.0, python-barbicanclient < 3.0.0, python-barbicanclient > 3.0.0
-Requires: python-glanceclient >= 1:0.14.0
-Requires: python-novaclient >= 1:2.18.0
+Requires: pyparsing >= 2.0.3
+Requires: python-barbicanclient >= 3.3.0
+Requires: python-glanceclient >= 1:0.18.0
+Requires: python-novaclient >= 1:2.28.0
Requires: python-swiftclient >= 2.2.0
-Requires: python-requests >= 2.2.0, python-requests < 2.4.0, python-requests > 2.4.0
-Requires: python-routes >= 1.12.3, python-routes < 2.0, python-routes > 2.0
-Requires: python-taskflow >= 0.4
-Requires: python-rtslib-fb >= 2.1.fb39
-Requires: python-six >= 1.7.0
-Requires: python-sqlalchemy >= 0.9.7, python-sqlalchemy <= 0.9.99
-Requires: python-migrate >= 0.9.1, python-migrate < 0.9.2, python-migrate > 0.9.2
-Requires: python-stevedore >= 1.1.0
-Requires: python-suds >= 0.4
+Requires: python-requests >= 2.5.2
+Requires: python-retrying >= 1.2.3
+Requires: python-routes >= 1.12.3
+Requires: python-taskflow >= 1.16
+Requires: python-rtslib >= 2.1.fb41
+Requires: python-six >= 1.9.0
+Requires: python-sqlalchemy >= 0.9.9
+Requires: python-migrate >= 0.9.6
+Requires: python-stevedore >= 1.5.0
+Requires: python-suds-jurko >= 0.6
Requires: python-webob >= 1.2.3
-Requires: python-wsgiref >= 0.1.2
-Requires: python-oslo.i18n >= 1.0.0
-
-Requires: python-qpid
-Requires: python-amqplib
-Requires: python-keystoneclient >= 1:0.10.0
-Requires: python-lockfile
-Requires: python-ceph
+Requires: python-oslo-i18n >= 1.5.0
+Requires: python-oslo-vmware >= 1.16.0
+
+Requires: os-brick >= 0.4.0
+
+#Requires: python-qpid
+#Requires: python-amqplib
+#Requires: python-lockfile
+#Requires: python-ceph
#Requires: iscsi-initiator-utils
%description -n python-cinder
Summary: Documentation for OpenStack Volume
Group: Documentation
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = 1:%{version}-%{release}
BuildRequires: graphviz
install -d -m 755 %{buildroot}%{_sysconfdir}/cinder
install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/cinder/cinder-dist.conf
install -p -D -m 640 %{SOURCE14} %{buildroot}%{_sysconfdir}/cinder/cinder.conf
-install -p -D -m 755 %{SOURCE15} %{buildroot}%{_datadir}/cinder/openstack-cinder-volume-vmware
install -d -m 755 %{buildroot}%{_sysconfdir}/cinder/volumes
install -p -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/tgt/conf.d/cinder.conf
install -p -D -m 640 etc/cinder/rootwrap.conf %{buildroot}%{_sysconfdir}/cinder/rootwrap.conf
install -p -D -m 640 etc/cinder/api-paste.ini %{buildroot}%{_sysconfdir}/cinder/api-paste.ini
install -p -D -m 640 etc/cinder/policy.json %{buildroot}%{_sysconfdir}/cinder/policy.json
+%if 0%{?rhel} == 6
# Install initscripts for services
install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/openstack-cinder-api
install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/openstack-cinder-scheduler
install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/openstack-cinder-volume
install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/openstack-cinder-backup
+%else
+# Install initscripts for services
+install -p -D -m 644 %{SOURCE30} %{buildroot}%{_unitdir}/openstack-cinder-api.service
+install -p -D -m 644 %{SOURCE31} %{buildroot}%{_unitdir}/openstack-cinder-scheduler.service
+install -p -D -m 644 %{SOURCE32} %{buildroot}%{_unitdir}/openstack-cinder-volume.service
+install -p -D -m 644 %{SOURCE33} %{buildroot}%{_unitdir}/openstack-cinder-backup.service
+%endif
# Install sudoers
install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/cinder
exit 0
%post
+%if 0%{?rhel} == 6
for svc in volume api scheduler backup; do
/sbin/chkconfig --add openstack-cinder-$svc
done
+%else
+%systemd_post openstack-cinder-volume
+%systemd_post openstack-cinder-api
+%systemd_post openstack-cinder-scheduler
+%systemd_post openstack-cinder-backup
+%endif
%preun
+%if 0%{?rhel} == 6
if [ $1 -eq 0 ] ; then
for svc in volume api scheduler backup; do
/sbin/service openstack-cinder-${svc} stop > /dev/null 2>&1
/sbin/chkconfig --del openstack-cinder-${svc}
done
fi
+%else
+%systemd_preun openstack-cinder-volume
+%systemd_preun openstack-cinder-api
+%systemd_preun openstack-cinder-scheduler
+%systemd_preun openstack-cinder-backup
+%endif
%postun
+%if 0%{?rhel} == 6
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
for svc in volume api scheduler backup; do
/sbin/service openstack-cinder-${svc} condrestart > /dev/null 2>&1 || :
done
fi
+%else
+%systemd_postun_with_restart openstack-cinder-volume
+%systemd_postun_with_restart openstack-cinder-api
+%systemd_postun_with_restart openstack-cinder-scheduler
+%systemd_postun_with_restart openstack-cinder-backup
+%endif
%files
%doc LICENSE
%dir %attr(0755, cinder, root) %{_sysconfdir}/cinder/volumes
%{_bindir}/cinder-*
+
+%if 0%{?rhel} == 6
%{_initrddir}/openstack-cinder-*
+%else
+%{_unitdir}/*.service
+%endif
+
%{_datarootdir}/cinder
%{_mandir}/man1/cinder*.1.gz
%endif
%changelog
+* Mon Sep 28 2015 Mikhail Ivanov <mivanov@mirantis.com> - 7.0.0.0rc1-1~mos8.0.1
+- Update to a new upstream version
+- Update build and runtime dependencies
+
* Wed Jun 11 2014 Eric Harney <eharney@redhat.com> - 2014.1.1-2
- Add dependency on iscsi-initiator-utils
+++ /dev/null
-#!/bin/sh
-#
-# openstack-cinder-volume OpenStack Cinder Volume Services
-#
-# chkconfig: - 98 02
-# description: Volume Workers interact with iSCSI storage to manage \
-# LVM-based instance volumes. Specific functions include: \
-# * Create Volumes \
-# * Establish Compute volumes
-## BEGIN INIT INFO
-# Provides:
-# Required-Start: $remote_fs $network $syslog
-# Required-Stop: $remote_fs $syslog
-# Default-Stop: 0 1 6
-# Short-Description: OpenStack cinder Volume Worker
-# Description: Volume Workers interact with iSCSI storage to manage
-# LVM-based instance volumes. Specific functions include:
-# * Create Volumes
-# * Delete Volumes
-# * Establish Compute volumes
-### END INIT INFO
-
-. /etc/rc.d/init.d/functions
-
-suffix=volume
-cluster=${0##*-} # s/cluster/index/
-prog=openstack-cinder-$suffix-vmware-$cluster
-exec="/usr/bin/cinder-$suffix"
-config="/etc/cinder/cinder.conf"
-pidfile="/var/run/cinder/cinder-$suffix.$cluster.pid"
-logfile="/var/log/cinder/$suffix-$cluster.log"
-
-[ -r /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
-
-lockfile=/var/lock/subsys/$prog
-
-start() {
- [ -x $exec ] || exit 5
- [ -f $config ] || exit 6
- echo -n $"Starting $prog: "
- daemon --user cinder --pidfile $pidfile "$exec --logfile $logfile ${OPTIONS} &>/dev/null & echo \$! > $pidfile"
- retval=$?
- echo
- [ $retval -eq 0 ] && touch $lockfile
- return $retval
-}
-
-stop() {
- echo -n $"Stopping $prog: "
- killproc -p $pidfile ${prog%%.*}
- if pgrep -f "cinder-$suffix.*$cluster\.conf" &>/dev/null ; then
- sleep 2
- pgrep -f "cinder-$suffix.*$cluster\.conf" &>/dev/null && \
- pkill -f "$cluster.conf"
- fi
- retval=$?
- echo
- [ $retval -eq 0 ] && rm -f $lockfile
- return $retval
-}
-
-restart() {
- stop
- start
-}
-
-reload() {
- restart
-}
-
-force_reload() {
- restart
-}
-
-rh_status() {
- status -p $pidfile $prog
-}
-
-rh_status_q() {
- rh_status >/dev/null 2>&1
-}
-
-
-case "$1" in
- start)
- rh_status_q && exit 0
- $1
- ;;
- stop)
- rh_status_q || exit 0
- $1
- ;;
- restart)
- $1
- ;;
- reload)
- rh_status_q || exit 7
- $1
- ;;
- force-reload)
- force_reload
- ;;
- status)
- rh_status
- ;;
- condrestart|try-restart)
- rh_status_q || exit 0
- restart
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
- exit 2
-esac
-exit $?