commit:     e62b628b1801b82f3cf6d9825b8648f55f03f341
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Mar 30 09:58:19 2022 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Mar 30 10:26:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=e62b628b

sys-cluster/cinder: new version

Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-cluster/cinder/Manifest                        |   3 +-
 sys-cluster/cinder/cinder-17.1.0.ebuild            | 192 -------------------
 sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild      | 207 +++++++++++++++++++++
 sys-cluster/cinder/files/cinder.logrotate          |   8 +
 sys-cluster/cinder/files/cinder.tmpfile            |   1 +
 .../cinder/files/openstack-cinder-api.service      |  14 ++
 .../cinder/files/openstack-cinder-backup.service   |  13 ++
 .../files/openstack-cinder-scheduler.service       |  13 ++
 .../cinder/files/openstack-cinder-volume.service   |  26 +++
 9 files changed, 283 insertions(+), 194 deletions(-)

diff --git a/sys-cluster/cinder/Manifest b/sys-cluster/cinder/Manifest
index 7ae129be5..8b474a5d9 100644
--- a/sys-cluster/cinder/Manifest
+++ b/sys-cluster/cinder/Manifest
@@ -1,2 +1 @@
-DIST cinder-17.1.0.tar.gz 5823116 BLAKE2B 
08f8c4e9acdd46d27ad5e35b8602dc7722ff0f08f577183860138f9085f6744abeccf6943d556419cc7584504c3245c19cfd4f17db4164cc8a4c144aa8c112bd
 SHA512 
f3e91945e81e5bb7edefba62050d3750ae5ab870903e55f46e8f0a5d3c140eada1df466d5fcc6623df8ad9688cad3c6519c712494cd20b8cfeb4b992e8f516cc
-DIST cinder.conf.sample-17.1.0 186451 BLAKE2B 
efc75cf3c5e852d411d9c2ed2080eb554a5f81c9b39a2ee9cf44add21842c05ea5b03cc66747da2182d2efc73d83b55323cecd4aa34db99369bf62b5ed1795bc
 SHA512 
ee60a62ec8490a38c995f9c4a9ede8eeec631745bdbc9bc6e1d195370687de5d99aa8754ea017f23e6a9542b987842c7ffd7cf203bfed37f2a7ddbe61a82d517
+DIST cinder-20.0.0.0rc1.tar.gz 5948385 BLAKE2B 
f8f2e2b4b88f4c81db61bc209b1408bf8c49db54b8b89095828d5baf3a1e6789889093ecb29b9494ec580c5878cd2cffcd5930992794d970a7582f190db5c134
 SHA512 
90e6845d96e896ddf40bd9992e80864a8441a74b265bdf559ada75f0a95af9f3041ee75d16312a9ae3871e35a23719248c7ed879b1511688afb3bf8b09239ab1

diff --git a/sys-cluster/cinder/cinder-17.1.0.ebuild 
b/sys-cluster/cinder/cinder-17.1.0.ebuild
deleted file mode 100644
index ae18e21e1..000000000
--- a/sys-cluster/cinder/cinder-17.1.0.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_8 )
-DISTUTILS_USE_SETUPTOOLS=rdepend
-
-inherit distutils-r1 linux-info
-
-DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of 
nova-volumes"
-HOMEPAGE="https://launchpad.net/cinder";
-
-if [[ ${PV} == *9999 ]];then
-       inherit git-r3
-       
SRC_URI="https://dev.gentoo.org/~prometheanfire/dist/openstack/cinder/victoria/cinder.conf.sample
 -> cinder.conf.sample-${PV}"
-       EGIT_REPO_URI="https://github.com/openstack/cinder.git";
-       EGIT_BRANCH="stable/victoria"
-else
-       
SRC_URI="https://dev.gentoo.org/~prometheanfire/dist/openstack/cinder/victoria/cinder.conf.sample
 -> cinder.conf.sample-${PV}
-       https://tarballs.openstack.org/${PN}/${P}.tar.gz";
-       KEYWORDS="~amd64"
-fi
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="+api +scheduler +volume infiniband iscsi lvm mysql +memcached postgres 
rdma sqlite +tcp test +tgt"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="|| ( mysql postgres sqlite ) iscsi? ( tgt ) infiniband? ( rdma )"
-
-DEPEND=">=dev-python/pbr-5.4.1[${PYTHON_USEDEP}]
-       app-admin/sudo"
-
-#      >=dev-python/oauth2client-1.5.0[${PYTHON_USEDEP}]  # do not include, 
upstream depricated
-#TODO: remove zstd
-RDEPEND="
-       >=dev-python/pbr-5.4.1[${PYTHON_USEDEP}]
-       >=dev-python/decorator-4.1.0[${PYTHON_USEDEP}]
-       >=dev-python/eventlet-0.26.0[${PYTHON_USEDEP}]
-       >=dev-python/greenlet-0.4.15[${PYTHON_USEDEP}]
-       >=dev-python/httplib2-0.9.1[${PYTHON_USEDEP}]
-       >=dev-python/importlib_metadata-1.7.0[${PYTHON_USEDEP}]
-       >=dev-python/iso8601-0.1.12[${PYTHON_USEDEP}]
-       >=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
-       >=dev-python/keystoneauth-3.14.0[${PYTHON_USEDEP}]
-       >=dev-python/keystonemiddleware-4.21.0[${PYTHON_USEDEP}]
-       >=dev-python/lxml-4.2.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-config-6.11.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-concurrency-3.26.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-context-2.23.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-db-6.0.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-log-3.44.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-messaging-6.4.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-middleware-3.31.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-policy-1.44.1[${PYTHON_USEDEP}]
-       >=dev-python/oslo-privsep-2.3.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-reports-1.18.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-rootwrap-5.8.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-serialization-2.25.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-service-2.0.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-upgradecheck-0.1.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-utils-3.40.2[${PYTHON_USEDEP}]
-       >=dev-python/oslo-versionedobjects-1.31.2[${PYTHON_USEDEP}]
-       >=dev-python/osprofiler-1.4.0[${PYTHON_USEDEP}]
-       >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
-       >=dev-python/paramiko-2.7.1[${PYTHON_USEDEP}]
-       >=dev-python/paste-2.0.2[${PYTHON_USEDEP}]
-       >=dev-python/pastedeploy-1.5.0[${PYTHON_USEDEP}]
-       >=dev-python/psutil-3.2.2[${PYTHON_USEDEP}]
-       >=dev-python/pyparsing-2.2.1[${PYTHON_USEDEP}]
-       >=dev-python/python-barbicanclient-4.9.0[${PYTHON_USEDEP}]
-       >=dev-python/python-glanceclient-2.15.0[${PYTHON_USEDEP}]
-       >=dev-python/python-keystoneclient-3.15.0[${PYTHON_USEDEP}]
-       >=dev-python/python-novaclient-9.1.0[${PYTHON_USEDEP}]
-       >=dev-python/python-swiftclient-3.2.0[${PYTHON_USEDEP}]
-       >=dev-python/pytz-2015.7[${PYTHON_USEDEP}]
-       >=dev-python/requests-2.18.0[${PYTHON_USEDEP}]
-       !~dev-python/requests-2.20.0[${PYTHON_USEDEP}]
-       >=dev-python/routes-2.3.1[${PYTHON_USEDEP}]
-       >=dev-python/taskflow-3.8.0[${PYTHON_USEDEP}]
-       >=dev-python/rtslib-fb-2.1.65[${PYTHON_USEDEP}]
-       >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
-       sqlite? (
-               >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
-       )
-       mysql? (
-               >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
-               !~dev-python/pymysql-0.7.7[${PYTHON_USEDEP}]
-               >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
-       )
-       postgres? (
-               >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
-               >=dev-python/sqlalchemy-1.3.0[sqlite,${PYTHON_USEDEP}]
-       )
-       >=dev-python/sqlalchemy-migrate-0.13.0[${PYTHON_USEDEP}]
-       >=dev-python/stevedore-1.31.0[${PYTHON_USEDEP}]
-       >=dev-python/tabulate-0.8.5[${PYTHON_USEDEP}]
-       >=dev-python/tenacity-6.1.0[${PYTHON_USEDEP}]
-       >=dev-python/webob-1.7.1[${PYTHON_USEDEP}]
-       >=dev-python/oslo-i18n-3.24.0[${PYTHON_USEDEP}]
-       >=dev-python/oslo-vmware-2.35.0[${PYTHON_USEDEP}]
-       >=dev-python/os-brick-4.0.1[${PYTHON_USEDEP}]
-       >=dev-python/os-win-4.2.0[${PYTHON_USEDEP}]
-       >=dev-python/tooz-1.58.0[${PYTHON_USEDEP}]
-       >=dev-python/google-api-python-client-1.4.2[${PYTHON_USEDEP}]
-       >=dev-python/castellan-1.3.0[${PYTHON_USEDEP}]
-       >=dev-python/cryptography-2.1.4[${PYTHON_USEDEP}]
-       >=dev-python/cursive-0.2.1[${PYTHON_USEDEP}]
-       >=dev-python/zstd-1.4.5.0[${PYTHON_USEDEP}]
-       iscsi? (
-               tgt? ( sys-block/tgt )
-               sys-block/open-iscsi
-       )
-       lvm? ( sys-fs/lvm2 )
-       memcached? ( net-misc/memcached )
-       app-emulation/qemu
-       sys-fs/sysfsutils
-       acct-user/cinder
-       acct-group/cinder"
-# qemu is needed for image conversion
-
-#PATCHES=(
-#)
-
-pkg_pretend() {
-       linux-info_pkg_setup
-       CONFIG_CHECK_MODULES=""
-       if use tcp; then
-               CONFIG_CHECK_MODULES+="SCSI_ISCSI_ATTRS ISCSI_TCP "
-       fi
-       if use rdma; then
-               CONFIG_CHECK_MODULES+="INFINIBAND_ISER "
-       fi
-       if use infiniband; then
-               CONFIG_CHECK_MODULES+="INFINIBAND_IPOIB INFINIBAND_USER_MAD 
INFINIBAND_USER_ACCESS"
-       fi
-       if linux_config_exists; then
-               for module in ${CONFIG_CHECK_MODULES}; do
-                       linux_chkconfig_present ${module} || ewarn "${module} 
needs to be enabled"
-               done
-       fi
-}
-
-python_prepare_all() {
-       sed -i '/^hacking/d' test-requirements.txt || die
-       # only used for docs
-       sed -i '/^sphinx-feature-classification/d' requirements.txt || die
-       distutils-r1_python_prepare_all
-}
-
-python_test() {
-       # Let's track progress of this # 
https://bugs.launchpad.net/swift/+bug/1249727
-       nosetests -I test_wsgi.py cinder/tests/ || die "tests failed under 
python2.7"
-}
-
-python_install_all() {
-       distutils-r1_python_install_all
-       keepdir /etc/cinder
-       dodir /etc/cinder/rootwrap.d
-
-       for svc in api scheduler volume; do
-               newinitd "${FILESDIR}/cinder.initd" cinder-${svc}
-       done
-
-       insinto /etc/cinder
-       insopts -m0640 -o cinder -g cinder
-       doins "etc/cinder/api-httpd.conf"
-       doins "etc/cinder/logging_sample.conf"
-       doins "etc/cinder/rootwrap.conf"
-       doins "etc/cinder/api-paste.ini"
-       doins "etc/cinder/resource_filters.json"
-       newins "${DISTDIR}/cinder.conf.sample-${PV}" "cinder.conf.sample"
-       insinto /etc/cinder/rootwrap.d
-       doins "etc/cinder/rootwrap.d/volume.filters"
-
-       dodir /var/log/cinder
-       fowners cinder:cinder /var/log/cinder
-
-       #add sudoers definitions for user nova
-       insinto /etc/sudoers.d/
-       insopts -m 0440 -o root -g root
-       newins "${FILESDIR}/cinder.sudoersd" cinder
-       # stupid python
-       rm -r "${ED}"/usr/etc
-}
-
-pkg_postinst() {
-       if use iscsi ; then
-               elog "Cinder needs tgtd to be installed and running to work 
with iscsi"
-               elog "it also needs 'include /var/lib/cinder/volumes/*' in 
/etc/tgt/targets.conf"
-       fi
-}

diff --git a/sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild 
b/sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild
new file mode 100644
index 000000000..8ba86ad84
--- /dev/null
+++ b/sys-cluster/cinder/cinder-20.0.0.0_rc1.ebuild
@@ -0,0 +1,207 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+MYP="${P/_rc/rc}"
+PYTHON_COMPAT=( python3_{8..9} )
+
+inherit distutils-r1 linux-info systemd tmpfiles
+
+DESCRIPTION="Cinder is the OpenStack Block storage service, a spin out of 
nova-volumes"
+HOMEPAGE="
+       https://launchpad.net/cinder
+       https://opendev.org/openstack/cinder/
+       https://pypi.org/project/cinder/
+       https://github.com/openstack/cinder
+"
+SRC_URI="https://tarballs.openstack.org/${PN}/${MYP}.tar.gz";
+KEYWORDS="~amd64"
+
+LICENSE="Apache-2.0 GPL-2"
+SLOT="0"
+IUSE="+api +scheduler +volume infiniband iscsi lvm mysql +memcached postgres 
rdma sqlite +tcp test +tgt"
+
+# qemu is needed for image conversion
+RDEPEND="
+       >=dev-python/pbr-5.8.0[${PYTHON_USEDEP}]
+       >=dev-python/decorator-4.4.2[${PYTHON_USEDEP}]
+       >=dev-python/eventlet-0.30.1[${PYTHON_USEDEP}]
+       >=dev-python/greenlet-0.4.16[${PYTHON_USEDEP}]
+       >=dev-python/httplib2-0.18.1[${PYTHON_USEDEP}]
+       >=dev-python/iso8601-0.1.12[${PYTHON_USEDEP}]
+       >=dev-python/jsonschema-3.2.0[${PYTHON_USEDEP}]
+       >=dev-python/keystoneauth-4.2.1[${PYTHON_USEDEP}]
+       >=dev-python/keystonemiddleware-9.1.0[${PYTHON_USEDEP}]
+       >=dev-python/lxml-4.5.2[${PYTHON_USEDEP}]
+       >=dev-python/oauth2client-4.1.3[${PYTHON_USEDEP}]
+       >=dev-python/oslo-config-8.3.2[${PYTHON_USEDEP}]
+       >=dev-python/oslo-concurrency-4.5.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-context-3.4.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-db-11.0.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-log-4.6.1[${PYTHON_USEDEP}]
+       >=dev-python/oslo-messaging-12.5.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-middleware-4.1.1[${PYTHON_USEDEP}]
+       >=dev-python/oslo-policy-3.8.1[${PYTHON_USEDEP}]
+       >=dev-python/oslo-privsep-2.6.2[${PYTHON_USEDEP}]
+       >=dev-python/oslo-reports-2.2.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-rootwrap-6.2.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-serialization-4.2.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-service-2.8.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-upgradecheck-1.1.1[${PYTHON_USEDEP}]
+       >=dev-python/oslo-utils-4.12.1[${PYTHON_USEDEP}]
+       >=dev-python/oslo-versionedobjects-2.3.0[${PYTHON_USEDEP}]
+       >=dev-python/osprofiler-3.4.0[${PYTHON_USEDEP}]
+       >=dev-python/packaging-20.4[${PYTHON_USEDEP}]
+       >=dev-python/paramiko-2.7.2[${PYTHON_USEDEP}]
+       >=dev-python/paste-3.4.3[${PYTHON_USEDEP}]
+       >=dev-python/pastedeploy-2.1.0[${PYTHON_USEDEP}]
+       >=dev-python/psutil-5.7.2[${PYTHON_USEDEP}]
+       >=dev-python/pyparsing-2.4.7[${PYTHON_USEDEP}]
+       >=dev-python/python-barbicanclient-5.0.1[${PYTHON_USEDEP}]
+       >=dev-python/python-glanceclient-3.2.2[${PYTHON_USEDEP}]
+       >=dev-python/python-keystoneclient-4.1.1[${PYTHON_USEDEP}]
+       >=dev-python/python-novaclient-17.2.1[${PYTHON_USEDEP}]
+       >=dev-python/python-swiftclient-3.10.1[${PYTHON_USEDEP}]
+       >=dev-python/pytz-2020.1[${PYTHON_USEDEP}]
+       >=dev-python/requests-2.25.1[${PYTHON_USEDEP}]
+       >=dev-python/routes-2.4.1[${PYTHON_USEDEP}]
+       >=dev-python/taskflow-4.5.0[${PYTHON_USEDEP}]
+       >=dev-python/rtslib-fb-2.1.74[${PYTHON_USEDEP}]
+       >=dev-python/six-1.15.0[${PYTHON_USEDEP}]
+       >=dev-python/sqlalchemy-migrate-0.13.0[${PYTHON_USEDEP}]
+       >=dev-python/stevedore-3.2.2[${PYTHON_USEDEP}]
+       >=dev-python/tabulate-0.8.7[${PYTHON_USEDEP}]
+       >=dev-python/tenacity-6.3.1[${PYTHON_USEDEP}]
+       >=dev-python/webob-1.8.6[${PYTHON_USEDEP}]
+       >=dev-python/oslo-i18n-5.1.0[${PYTHON_USEDEP}]
+       >=dev-python/oslo-vmware-3.10.0[${PYTHON_USEDEP}]
+       >=dev-python/os-brick-5.2.0[${PYTHON_USEDEP}]
+       >=dev-python/os-win-5.5.0[${PYTHON_USEDEP}]
+       >=dev-python/tooz-2.7.1[${PYTHON_USEDEP}]
+       >=dev-python/google-api-python-client-1.11.0[${PYTHON_USEDEP}]
+       >=dev-python/castellan-3.7.0[${PYTHON_USEDEP}]
+       >=dev-python/cryptography-3.1[${PYTHON_USEDEP}]
+       >=dev-python/cursive-0.2.2[${PYTHON_USEDEP}]
+       >=dev-python/zstd-1.4.5.1[${PYTHON_USEDEP}]
+       >=dev-python/boto3-1.16.51[${PYTHON_USEDEP}]
+
+       iscsi? (
+               tgt? ( sys-block/tgt )
+               sys-block/open-iscsi
+       )
+       lvm? ( sys-fs/lvm2 )
+       memcached? ( net-misc/memcached )
+       mysql? (
+               >=dev-python/pymysql-0.7.6[${PYTHON_USEDEP}]
+               >=dev-python/sqlalchemy-1.4.23[${PYTHON_USEDEP}]
+       )
+       sqlite? (
+               >=dev-python/sqlalchemy-1.4.23[sqlite,${PYTHON_USEDEP}]
+       )
+       postgres? (
+               >=dev-python/psycopg-2.5.0[${PYTHON_USEDEP}]
+               >=dev-python/sqlalchemy-1.4.23[${PYTHON_USEDEP}]
+       )
+
+       acct-user/cinder
+       acct-group/cinder
+       app-emulation/qemu
+       sys-fs/sysfsutils
+"
+DEPEND="
+       ${RDEPEND}
+       app-admin/sudo
+"
+BDEPEND="
+       test? (
+               >=dev-python/ddt-1.4.4[${PYTHON_USEDEP}]
+               >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
+               >=dev-python/oslotest-4.5.0[${PYTHON_USEDEP}]
+               >=dev-python/testtools-2.4.0[${PYTHON_USEDEP}]
+       )
+"
+
+RESTRICT="!test? ( test )"
+REQUIRED_USE="
+       || ( mysql postgres sqlite )
+       iscsi? ( tgt )
+       infiniband? ( rdma )
+       test? ( mysql postgres )
+"
+
+pkg_pretend() {
+       linux-info_pkg_setup
+       CONFIG_CHECK_MODULES=""
+       if use tcp; then
+               CONFIG_CHECK_MODULES+="SCSI_ISCSI_ATTRS ISCSI_TCP "
+       fi
+       if use rdma; then
+               CONFIG_CHECK_MODULES+="INFINIBAND_ISER "
+       fi
+       if use infiniband; then
+               CONFIG_CHECK_MODULES+="INFINIBAND_IPOIB INFINIBAND_USER_MAD 
INFINIBAND_USER_ACCESS"
+       fi
+       if linux_config_exists; then
+               for module in ${CONFIG_CHECK_MODULES}; do
+                       linux_chkconfig_present ${module} || ewarn "${module} 
needs to be enabled"
+               done
+       fi
+}
+
+python_prepare_all() {
+       sed -i '/^hacking/d' test-requirements.txt || die
+       # only used for docs
+       sed -i '/^sphinx-feature-classification/d' requirements.txt || die
+       distutils-r1_python_prepare_all
+}
+
+python_compile_all() {
+       oslo-config-generator 
--config-file=tools/config/cinder-config-generator.conf || die
+       oslopolicy-sample-generator 
--config-file=tools/config/cinder-policy-generator.conf || die
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
+       keepdir /etc/cinder
+       dodir /etc/cinder/rootwrap.d
+
+       for svc in api backup scheduler volume; do
+               newinitd "${FILESDIR}/cinder.initd" "cinder-${svc}"
+               systemd_dounit "${FILESDIR}/openstack-cinder-${svc}.service"
+       done
+
+       insinto /etc/cinder
+       insopts -m 0640 -o cinder -g cinder
+       doins "etc/cinder/api-httpd.conf"
+       doins "etc/cinder/logging_sample.conf"
+       doins "etc/cinder/rootwrap.conf"
+       doins "etc/cinder/api-paste.ini"
+       doins "etc/cinder/resource_filters.json"
+       doins "etc/cinder/cinder.conf.sample"
+       doins "etc/cinder/policy.yaml.sample"
+       insinto /etc/cinder/rootwrap.d
+       doins "etc/cinder/rootwrap.d/volume.filters"
+
+       dodir /var/log/cinder
+       fowners cinder:cinder /var/log/cinder
+
+       #add sudoers definitions for user cinder
+       insinto /etc/sudoers.d/
+       insopts -m 0440 -o root -g root
+       newins "${FILESDIR}/cinder.sudoersd" cinder
+
+       newtmpfiles "${FILESDIR}/cinder.tmpfile" cinder.conf
+
+       insinto /etc/logrotate.d
+       newins "${FILESDIR}/cinder.logrotate" cinder.conf
+
+       rm -r "${ED}/usr/etc"
+}
+
+pkg_postinst() {
+       if use iscsi ; then
+               elog "Cinder needs tgtd to be installed and running to work 
with iscsi"
+               elog "it also needs 'include /var/lib/cinder/volumes/*' in 
/etc/tgt/targets.conf"
+       fi
+}

diff --git a/sys-cluster/cinder/files/cinder.logrotate 
b/sys-cluster/cinder/files/cinder.logrotate
new file mode 100644
index 000000000..f96b1b8bb
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder.logrotate
@@ -0,0 +1,8 @@
+/var/log/cinder/*.log {
+    daily
+    missingok
+    compress
+    delaycompress
+    notifempty
+    copytruncate
+}

diff --git a/sys-cluster/cinder/files/cinder.tmpfile 
b/sys-cluster/cinder/files/cinder.tmpfile
new file mode 100644
index 000000000..cb4b3167d
--- /dev/null
+++ b/sys-cluster/cinder/files/cinder.tmpfile
@@ -0,0 +1 @@
+d /run/cinder 0755 cinder cinder -

diff --git a/sys-cluster/cinder/files/openstack-cinder-api.service 
b/sys-cluster/cinder/files/openstack-cinder-api.service
new file mode 100644
index 000000000..a3c890a0b
--- /dev/null
+++ b/sys-cluster/cinder/files/openstack-cinder-api.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=OpenStack Cinder API Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=cinder
+ExecStart=/usr/bin/cinder-api --config-file /usr/share/cinder/cinder-dist.conf 
--config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/api.log
+Restart=on-failure
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/cinder/files/openstack-cinder-backup.service 
b/sys-cluster/cinder/files/openstack-cinder-backup.service
new file mode 100644
index 000000000..39d38773f
--- /dev/null
+++ b/sys-cluster/cinder/files/openstack-cinder-backup.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenStack Cinder Backup Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=cinder
+ExecStart=/usr/bin/cinder-backup --config-file 
/usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf 
--logfile /var/log/cinder/backup.log
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/cinder/files/openstack-cinder-scheduler.service 
b/sys-cluster/cinder/files/openstack-cinder-scheduler.service
new file mode 100644
index 000000000..806208192
--- /dev/null
+++ b/sys-cluster/cinder/files/openstack-cinder-scheduler.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=OpenStack Cinder Scheduler Server
+After=syslog.target network.target
+
+[Service]
+Type=simple
+User=cinder
+ExecStart=/usr/bin/cinder-scheduler --config-file 
/usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf 
--logfile /var/log/cinder/scheduler.log
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+

diff --git a/sys-cluster/cinder/files/openstack-cinder-volume.service 
b/sys-cluster/cinder/files/openstack-cinder-volume.service
new file mode 100644
index 000000000..6b7dc8700
--- /dev/null
+++ b/sys-cluster/cinder/files/openstack-cinder-volume.service
@@ -0,0 +1,26 @@
+[Unit]
+Description=OpenStack Cinder Volume Server
+After=syslog.target
+After=network.target
+After=target.service
+After=iscsi.service
+After=iscsid.service
+After=lvm-cinder.service
+Requires=lvm-cinder.service
+Wants=lvm-cinder.service
+Wants=target.service
+Wants=iscsi.service
+Wants=iscsid.service
+
+[Service]
+LimitNOFILE=131072
+LimitNPROC=131072
+Type=simple
+User=cinder
+ExecStart=/usr/bin/cinder-volume --config-file 
/usr/share/cinder/cinder-dist.conf --config-file /etc/cinder/cinder.conf 
--logfile /var/log/cinder/volume.log
+Restart=on-failure
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
+

Reply via email to