summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--cinder-sudoers3
-rw-r--r--cinder.logrotate11
-rw-r--r--cinder_pyparsing.patch13
-rw-r--r--openstack-cinder-api.service14
-rw-r--r--openstack-cinder-backup.service13
-rw-r--r--openstack-cinder-scheduler.service13
-rw-r--r--openstack-cinder-volume.service16
-rw-r--r--openstack-cinder.spec408
-rw-r--r--sources1
10 files changed, 493 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..dd0eaf2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/cinder-18.2.0.tar.gz
diff --git a/cinder-sudoers b/cinder-sudoers
new file mode 100644
index 0000000..ed5d479
--- /dev/null
+++ b/cinder-sudoers
@@ -0,0 +1,3 @@
+Defaults:cinder !requiretty
+
+cinder ALL = (root) NOPASSWD: /usr/bin/cinder-rootwrap /etc/cinder/rootwrap.conf *
diff --git a/cinder.logrotate b/cinder.logrotate
new file mode 100644
index 0000000..b31713f
--- /dev/null
+++ b/cinder.logrotate
@@ -0,0 +1,11 @@
+compress
+
+/var/log/cinder/*.log {
+ weekly
+ rotate 4
+ missingok
+ compress
+ minsize 100k
+ size 10M
+ copytruncate
+}
diff --git a/cinder_pyparsing.patch b/cinder_pyparsing.patch
new file mode 100644
index 0000000..0cd691f
--- /dev/null
+++ b/cinder_pyparsing.patch
@@ -0,0 +1,13 @@
+diff --git a/cinder/scheduler/evaluator/evaluator.py b/cinder/scheduler/evaluator/evaluator.py
+index 435c5b1..ea92795 100644
+--- a/cinder/scheduler/evaluator/evaluator.py
++++ b/cinder/scheduler/evaluator/evaluator.py
+@@ -236,7 +236,7 @@ def _def_parser():
+
+ oneOf = pyparsing.oneOf
+ opAssoc = pyparsing.opAssoc
+- operatorPrecedence = pyparsing.operatorPrecedence
++ operatorPrecedence = pyparsing.infixNotation
+ Word = pyparsing.Word
+
+ integer = Word(nums)
diff --git a/openstack-cinder-api.service b/openstack-cinder-api.service
new file mode 100644
index 0000000..e87c4b8
--- /dev/null
+++ b/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 /etc/cinder/cinder.conf --logfile /var/log/cinder/api.log
+Restart=on-failure
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/openstack-cinder-backup.service b/openstack-cinder-backup.service
new file mode 100644
index 0000000..61e317b
--- /dev/null
+++ b/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 /etc/cinder/cinder.conf --logfile /var/log/cinder/backup.log
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/openstack-cinder-scheduler.service b/openstack-cinder-scheduler.service
new file mode 100644
index 0000000..bc9c7bf
--- /dev/null
+++ b/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 /etc/cinder/cinder.conf --logfile /var/log/cinder/scheduler.log
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/openstack-cinder-volume.service b/openstack-cinder-volume.service
new file mode 100644
index 0000000..91a8f78
--- /dev/null
+++ b/openstack-cinder-volume.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OpenStack Cinder Volume Server
+After=syslog.target network.target
+
+[Service]
+LimitNOFILE=131072
+LimitNPROC=131072
+Type=simple
+User=cinder
+ExecStart=/usr/bin/cinder-volume --config-file /etc/cinder/cinder.conf --logfile /var/log/cinder/volume.log
+Restart=on-failure
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/openstack-cinder.spec b/openstack-cinder.spec
new file mode 100644
index 0000000..4054075
--- /dev/null
+++ b/openstack-cinder.spec
@@ -0,0 +1,408 @@
+%global service cinder
+
+%global common_desc \
+OpenStack Volume (codename Cinder) provides services to manage and \
+access block storage volumes for use by Virtual Machine instances.
+
+Name: openstack-%{service}
+Version: 18.2.0
+Release: 2
+Summary: OpenStack Volume service
+License: ASL 2.0
+URL: http://www.openstack.org/software/openstack-storage/
+BuildArch: noarch
+
+Source0: https://tarballs.openstack.org/cinder/cinder-18.2.0.tar.gz
+
+Source10: openstack-%{service}-api.service
+Source11: openstack-%{service}-scheduler.service
+Source12: openstack-%{service}-volume.service
+Source13: openstack-%{service}-backup.service
+
+Source20: %{service}-sudoers
+Source21: %{service}.logrotate
+
+Patch01: cinder_pyparsing.patch
+
+BuildRequires: openstack-macros
+BuildRequires: python3-os-win
+BuildRequires: python3-pbr
+BuildRequires: python3-jsonschema
+BuildRequires: python3-castellan
+BuildRequires: python3-cursive
+BuildRequires: python3-routes
+BuildRequires: python3-webob
+BuildRequires: python3-barbicanclient
+BuildRequires: python3-glanceclient
+BuildRequires: python3-keystoneclient
+BuildRequires: python3-novaclient
+BuildRequires: python3-swiftclient
+BuildRequires: python3-google-api-client
+BuildRequires: python3-keystonemiddleware
+BuildRequires: python3-keystoneauth1
+BuildRequires: python3-osprofiler
+BuildRequires: python3-oslo-middleware
+BuildRequires: python3-oslo-messaging
+BuildRequires: python3-oslo-policy
+BuildRequires: python3-oslo-reports
+BuildRequires: python3-oslo-vmware
+BuildRequires: python3-oauth2client
+BuildRequires: python3-packaging
+BuildRequires: python3-paste
+BuildRequires: python3-paste-deploy
+BuildRequires: python3-paramiko
+BuildRequires: python3-eventlet
+BuildRequires: python3-greenlet
+BuildRequires: python3-iso8601
+BuildRequires: python3-stevedore
+BuildRequires: python3-tooz
+BuildRequires: python3-sqlalchemy
+BuildRequires: python3-six
+BuildRequires: python3-psutil
+BuildRequires: python3-os-brick
+BuildRequires: python3-oslo-config
+BuildRequires: python3-oslo-concurrency
+BuildRequires: python3-oslo-context
+BuildRequires: python3-oslo-db
+BuildRequires: python3-oslo-i18n
+BuildRequires: python3-oslo-log
+BuildRequires: python3-oslo-privsep
+BuildRequires: python3-oslo-rootwrap
+BuildRequires: python3-oslo-serialization
+BuildRequires: python3-oslo-service
+BuildRequires: python3-oslo-utils
+BuildRequires: python3-oslo-versionedobjects
+BuildRequires: python3-oslo-upgradecheck
+BuildRequires: python3-taskflow
+BuildRequires: python3-requests
+BuildRequires: python3-pyparsing
+BuildRequires: python3-pytz
+BuildRequires: python3-tabulate
+BuildRequires: python3-cryptography
+BuildRequires: python3-lxml
+BuildRequires: python3-sqlalchemy-migrate
+BuildRequires: python3-httplib2
+BuildRequires: python3-tenacity
+BuildRequires: python3-decorator
+BuildRequires: python3-rtslib
+BuildRequires: python3-zstd
+BuildRequires: python3-importlib_metadata
+BuildRequires: python3-boto3
+# Needed for unit tests
+BuildRequires: python3-hacking
+BuildRequires: python3-flake8-import-order
+BuildRequires: python3-flake8-logging-format
+BuildRequires: python3-coverage
+BuildRequires: python3-PyMySQL
+BuildRequires: python3-psycopg2
+BuildRequires: python3-SQLAlchemy-Utils
+BuildRequires: python3-ddt
+BuildRequires: python3-fixtures
+BuildRequires: python3-oslotest
+BuildRequires: python3-testtools
+BuildRequires: python3-stestr
+BuildRequires: python3-bandit
+BuildRequires: python3-doc8
+BuildRequires: python3-mypy
+BuildRequires: python3-moto
+
+Requires: python3-cinderclient
+Requires: python3-pyudev
+Requires(pre): shadow-utils
+Requires: openstack-%{service}-api = %{version}-%{release}
+Requires: openstack-%{service}-scheduler = %{version}-%{release}
+Requires: openstack-%{service}-volume = %{version}-%{release}
+Requires: openstack-%{service}-backup = %{version}-%{release}
+
+%description
+%{common_desc}
+
+%package api
+Summary: OpenStack Volume service (Cinder) - API
+Requires: %{name}-common = %{version}-%{release}
+
+%description api
+%{common_desc}
+This package contains the %{name} API server.
+
+%package scheduler
+Summary: OpenStack Volume service (Cinder) - Scheduler
+Requires: %{name}-common = %{version}-%{release}
+
+%description scheduler
+%{common_desc}
+This package contains the %{name} Scheduler server.
+
+%package volume
+Summary: OpenStack Volume service (Cinder) - Volume
+Requires: %{name}-common = %{version}-%{release}
+
+%description volume
+%{common_desc}
+This package contains the %{name} Volume server.
+
+%package backup
+Summary: OpenStack Volume service (Cinder) - Backup
+Requires: %{name}-common = %{version}-%{release}
+Requires: targetcli
+
+%description backup
+%{common_desc}
+This package contains the %{name} Backup server.
+
+%package common
+Summary: OpenStack Volume service (Cinder) - Common
+Requires: python3-cinder = %{version}-%{release}
+
+%description common
+%{common_desc}
+This package contains scripts, config and dependencies shared between all the ${name} services
+
+%package -n python3-%{service}
+Summary: OpenStack Volume Python libraries
+Requires: python3-os-win
+Requires: python3-pbr
+Requires: python3-jsonschema
+Requires: python3-castellan
+Requires: python3-cursive
+Requires: python3-routes
+Requires: python3-webob
+Requires: python3-barbicanclient
+Requires: python3-glanceclient
+Requires: python3-keystoneclient
+Requires: python3-novaclient
+Requires: python3-swiftclient
+Requires: python3-google-api-client
+Requires: python3-keystonemiddleware
+Requires: python3-keystoneauth1
+Requires: python3-osprofiler
+Requires: python3-oslo-middleware
+Requires: python3-oslo-messaging
+Requires: python3-oslo-policy
+Requires: python3-oslo-reports
+Requires: python3-oslo-vmware
+Requires: python3-oslo-upgradecheck
+Requires: python3-oauth2client
+Requires: python3-packaging
+Requires: python3-paste
+Requires: python3-paste-deploy
+Requires: python3-paramiko
+Requires: python3-eventlet
+Requires: python3-greenlet
+Requires: python3-iso8601
+Requires: python3-stevedore
+Requires: python3-tooz
+Requires: python3-sqlalchemy
+Requires: python3-six
+Requires: python3-psutil
+Requires: python3-os-brick
+Requires: python3-oslo-config
+Requires: python3-oslo-concurrency
+Requires: python3-oslo-context
+Requires: python3-oslo-db
+Requires: python3-oslo-i18n
+Requires: python3-oslo-log
+Requires: python3-oslo-privsep
+Requires: python3-oslo-rootwrap
+Requires: python3-oslo-serialization
+Requires: python3-oslo-service
+Requires: python3-oslo-utils
+Requires: python3-oslo-versionedobjects
+Requires: python3-taskflow
+Requires: python3-requests
+Requires: python3-pyparsing
+Requires: python3-pytz
+Requires: python3-tabulate
+Requires: python3-cryptography
+Requires: python3-lxml
+Requires: python3-sqlalchemy-migrate
+Requires: python3-httplib2
+Requires: python3-tenacity
+Requires: python3-decorator
+Requires: python3-rtslib
+Requires: lvm2
+Requires: sudo
+Requires: sysfsutils
+Requires: cryptsetup
+Requires: cracklib-dicts
+Requires: qemu-img
+Requires: iscsi-initiator-utils
+Requires: python3-zstd
+Requires: python3-importlib_metadata
+Requires: python3-boto3
+
+%description -n python3-%{service}
+%{common_desc}
+This package contains the %{service} Python library.
+
+%package -n python3-%{service}-tests
+Summary: Cinder tests
+
+Requires: python3-hacking
+Requires: python3-flake8-import-order
+Requires: python3-flake8-logging-format
+Requires: python3-coverage
+Requires: python3-PyMySQL
+Requires: python3-psycopg2
+Requires: python3-SQLAlchemy-Utils
+Requires: python3-ddt
+Requires: python3-fixtures
+Requires: python3-oslotest
+Requires: python3-subunit
+Requires: python3-testtools
+Requires: python3-stestr
+Requires: python3-bandit
+Requires: python3-doc8
+Requires: python3-mypy
+Requires: python3-moto
+Requires: python3-%{service}
+
+%description -n python3-%{service}-tests
+%{common_desc}
+This package contains the Cinder test files.
+
+%prep
+%autosetup -n %{service}-%{version} -p1
+%py_req_cleanup
+
+%build
+%{py3_build}
+oslo-config-generator --config-file=tools/config/%{service}-config-generator.conf
+
+%install
+%{py3_install}
+install -d -m 755 %{buildroot}%{_sharedstatedir}/%{service}
+install -d -m 755 %{buildroot}%{_sharedstatedir}/%{service}/tmp
+install -d -m 755 %{buildroot}%{_sysconfdir}/%{service}
+install -d -m 755 %{buildroot}%{_sysconfdir}/%{service}/rootwrap.d
+install -d -m 755 %{buildroot}%{_sysconfdir}/%{service}/volumes
+install -d -m 755 %{buildroot}%{_localstatedir}/log/%{service}
+install -d -m 755 %{buildroot}%{_localstatedir}/run/%{service}
+install -d -m 755 %{buildroot}%{_datarootdir}
+install -d -m 755 %{buildroot}%{_datarootdir}/%{service}
+install -d -m 755 %{buildroot}%{_datarootdir}/%{service}/rootwrap/
+install -p -D -m 640 %{SOURCE10} %{buildroot}%{_unitdir}/openstack-%{service}-api.service
+install -p -D -m 640 %{SOURCE11} %{buildroot}%{_unitdir}/openstack-%{service}-scheduler.service
+install -p -D -m 640 %{SOURCE12} %{buildroot}%{_unitdir}/openstack-%{service}-volume.service
+install -p -D -m 640 %{SOURCE13} %{buildroot}%{_unitdir}/openstack-%{service}-backup.service
+install -p -D -m 440 %{SOURCE20} %{buildroot}%{_sysconfdir}/sudoers.d/%{service}
+install -p -D -m 644 %{SOURCE21} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-%{service}
+install -p -D -m 640 etc/%{service}/rootwrap.conf %{buildroot}%{_sysconfdir}/%{service}/rootwrap.conf
+install -p -D -m 640 etc/%{service}/api-paste.ini %{buildroot}%{_sysconfdir}/%{service}/api-paste.ini
+install -p -D -m 640 etc/%{service}/%{service}.conf.sample %{buildroot}%{_sysconfdir}/%{service}/%{service}.conf
+install -p -D -m 640 etc/%{service}/resource_filters.json %{buildroot}%{_sysconfdir}/%{service}/resource_filters.json
+install -p -D -m 640 etc/%{service}/rootwrap.d/* %{buildroot}%{_datarootdir}/%{service}/rootwrap/
+rm -f %{buildroot}%{python3_sitelib}/%{service}/locale/*/LC_*/%{service}*po
+rm -f %{buildroot}%{python3_sitelib}/%{service}/locale/*pot
+mv %{buildroot}%{python3_sitelib}/%{service}/locale %{buildroot}%{_datarootdir}/locale
+rm -rf %{buildroot}%{_prefix}/etc
+
+#%check
+#OS_TEST_PATH=./%{service}/tests/unit ostestr --concurrency=2
+
+%pre common
+%openstack_pre_user_group_create %{service} %{service} /sbin/nologin
+exit 0
+
+%post volume
+%systemd_post openstack-%{service}-volume
+%post api
+%systemd_post openstack-%{service}-api
+%post scheduler
+%systemd_post openstack-%{service}-scheduler
+%post backup
+%systemd_post openstack-%{service}-backup
+
+%preun volume
+%systemd_preun openstack-%{service}-volume
+%preun api
+%systemd_preun openstack-%{service}-api
+%preun scheduler
+%systemd_preun openstack-%{service}-scheduler
+%preun backup
+%systemd_preun openstack-%{service}-backup
+
+%postun volume
+%systemd_postun_with_restart openstack-%{service}-volume
+%postun api
+%systemd_postun_with_restart openstack-%{service}-api
+%postun scheduler
+%systemd_postun_with_restart openstack-%{service}-scheduler
+%postun backup
+%systemd_postun_with_restart openstack-%{service}-backup
+
+%files
+
+%files api
+%{_bindir}/cinder-api
+%{_unitdir}/openstack-cinder-api.service
+
+%files scheduler
+%{_bindir}/cinder-scheduler
+%{_unitdir}/openstack-cinder-scheduler.service
+
+%files volume
+%{_bindir}/cinder-volume
+%{_unitdir}/openstack-cinder-volume.service
+
+%files backup
+%{_bindir}/cinder-backup
+%{_unitdir}/openstack-cinder-backup.service
+
+%files common
+%license LICENSE
+%dir %attr(0750, %{service}, %{service}) %{_sysconfdir}/%{service}
+%dir %attr(0750, %{service}, %{service}) %{_sysconfdir}/%{service}/volumes
+%dir %attr(0750, %{service}, %{service}) %{_localstatedir}/log/%{service}
+%dir %attr(0750, %{service}, %{service}) %{_localstatedir}/run/%{service}
+%dir %attr(0750, %{service}, %{service}) %{_sharedstatedir}/%{service}
+%dir %attr(0750, %{service}, %{service}) %{_sharedstatedir}/%{service}/tmp
+%attr(-, %{service}, %{service}) %{_sysconfdir}/%{service}/rootwrap.d/
+%attr(-, %{service}, %{service}) %{_datarootdir}/%{service}
+%attr(0640, root, %{service}) %{_sysconfdir}/logrotate.d/openstack-%{service}
+%attr(0440, root, root) %{_sysconfdir}/sudoers.d/%{service}
+%config(noreplace) %attr(0640, %{service}, %{service}) %{_sysconfdir}/%{service}/%{service}.conf
+%config(noreplace) %attr(0640, %{service}, %{service}) %{_sysconfdir}/%{service}/api-paste.ini
+%config(noreplace) %attr(0640, %{service}, %{service}) %{_sysconfdir}/%{service}/rootwrap.conf
+%config(noreplace) %attr(0640, %{service}, %{service}) %{_sysconfdir}/%{service}/resource_filters.json
+%{_bindir}/%{service}-*
+%exclude %{_bindir}/%{service}-api
+%exclude %{_bindir}/%{service}-scheduler
+%exclude %{_bindir}/%{service}-volume
+%exclude %{_bindir}/%{service}-backup
+
+%files -n python3-%{service}
+%license LICENSE
+%{python3_sitelib}/%{service}
+%{python3_sitelib}/%{service}-*.egg-info
+%{_bindir}/%{service}-rtstool
+%exclude %{python3_sitelib}/%{service}/tests
+
+%files -n python3-%{service}-tests
+%license LICENSE
+%{python3_sitelib}/%{service}/tests
+
+%changelog
+* Apr 24 2023 zhengting <zhengting13@huawei.com> - 18.2.0-2
+- Fix depracted attribute
+
+* Apr 24 2023 songchao <songchao@unionpay.com> - 18.2.0-1
+- Upgrade to 18.2.0
+
+* Mon Feb 21 2022 wangxiyuan <wangxiyuan1007@gmail.com> - 18.1.0-1
+- Upgrade to 18.1.0
+
+* Thu Aug 12 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 18.0.0-1
+- Upgrade to OpenStack Wallaby version
+
+* Fri Aug 06 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 17.0.0-4
+- Remove epoch tag
+
+* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 17.0.0-3
+- DESC: delete -S git from %autosetup, and delete BuildRequires git-core
+
+* Sat Feb 20 2021 yaozc701 <yaozc7@foxmail.com>
+- update spec file python3-migrate —> python3-sqlalchemy-migrate
+
+* Tue Feb 02 2021 yaozc701 <yaozc7@foxmail.com>
+- update spec file
diff --git a/sources b/sources
new file mode 100644
index 0000000..0f4e3cb
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+75d43fec7a9f3105a00f2b502f96f828 cinder-18.2.0.tar.gz