Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
ff5bae299a !33 【轻量级 PR】:Disable unstable unit test
Merge pull request !33 from 王玺源/N/A
2021-12-13 01:06:44 +00:00
王玺源
6f6b77dda5
Disable unstable unit test 2021-12-10 08:59:43 +00:00
openeuler-ci-bot
ee09469fc5 !32 [sync] PR-31: add openstack-glance-registry && openstack-glance-scrubber
From: @openeuler-sync-bot
Reviewed-by: @xiyuanwang
Signed-off-by: @xiyuanwang
2021-11-26 02:56:34 +00:00
FFrog
c0cbd65a8c add openstack-glance-registry && openstack-glance-scrubber
(cherry picked from commit a246e561a26d7553ed755a0d6cb593b8b102b684)
2021-11-26 10:33:30 +08:00
openeuler-ci-bot
b49384515b !30 [sync] PR-29: fix the bugs on how to generate etc/policy.json
From: @openeuler-sync-bot
Reviewed-by: @xiyuanwang
Signed-off-by: @xiyuanwang
2021-11-19 08:09:50 +00:00
FFrog
08ec39793d fix the bugs on openstack-glance
(cherry picked from commit c87ad37e8a60d856a9f3170c078205580eb532bb)
2021-11-19 14:49:44 +08:00
openeuler-ci-bot
e4c1cbaf89 !28 support Train for 20.03 SP3
From: @ffrog
Reviewed-by: @xiyuanwang
Signed-off-by: @xiyuanwang
2021-11-09 11:17:38 +00:00
FFrog
eec596ea1e support Train for 20.03 SP3 2021-11-05 10:55:12 +08:00
openeuler-ci-bot
e35cf2f85e !25 【轻量级 PR】:Make sure create glance user/group before install api
From: @huangtianhua
Reviewed-by: @xiyuanwang
Signed-off-by: @xiyuanwang
2021-08-26 09:32:59 +00:00
huangtianhua
1ce57b6759 Make sure create glance user/group before install api 2021-08-26 09:17:23 +00:00
6 changed files with 167 additions and 50 deletions

3
glance Normal file
View File

@ -0,0 +1,3 @@
Defaults:glance !requiretty
glance ALL = (root) NOPASSWD: /usr/bin/glance-rootwrap /etc/glance/rootwrap.conf *

BIN
glance-19.0.4.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
[Unit]
Description=OpenStack Image Service (code-named Glance) Registry server
After=syslog.target network.target
[Service]
Type=simple
User=glance
ExecStart=/usr/bin/glance-registry
PrivateTmp=true
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
[Unit]
Description=OpenStack Image Service deferred image deletion service
After=syslog.target network.target
[Service]
Type=simple
User=glance
ExecStart=/usr/bin/glance-scrubber
PrivateTmp=true
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@ -1,12 +1,19 @@
Name: openstack-glance
Version: 22.0.0
Release: 2
Version: 19.0.4
Release: 4
Summary: OpenStack Image Service (Glance)
License: ASL 2.0
URL: https://docs.openstack.org/glance
Source0: https://tarballs.opendev.org/openstack/glance/glance-22.0.0.tar.gz
Source1: openstack-glance.logrotate
Source2: openstack-glance-api.service
Source0: https://tarballs.opendev.org/openstack/glance/glance-19.0.4.tar.gz
Source10: openstack-glance-api.service
Source11: openstack-glance-registry.service
Source12: openstack-glance-scrubber.service
Source20: openstack-glance.logrotate
Source30: glance
BuildRequires: openstack-macros
BuildRequires: qemu-img
@ -80,6 +87,8 @@ BuildRequires: python3-os-brick
BuildRequires: python3-oslo-privsep
Requires: openstack-glance-api = %{version}-%{release}
Requires: openstack-glance-registry = %{version}-%{release}
Requires: openstack-glance-scrubber = %{version}-%{release}
BuildArch: noarch
%description
@ -95,12 +104,8 @@ OpenStack Swift project.
%package api
Summary: OpenStack Image service (Glance) - API
Requires: python3-glance = %{version}-%{release}
Requires: logrotate
Requires(post): systemd
Requires(postun): systemd
Requires(preun): systemd
Requires(pre): shadow-utils
Requires: openstack-glance-common = %{version}-%{release}
%description api
The Glance project provides a service where users can upload and discover
@ -115,7 +120,61 @@ OpenStack Swift project.
This package contains the %{name} API server.
%package -n python3-glance
%package registry
Summary: OpenStack Image service (Glance) - Registry
Requires: openstack-glance-common = %{version}-%{release}
%description registry
The Glance project provides a service where users can upload and discover
data assets that are meant to be used with other services. This currently
includes images and metadata definitions.
Glance image services include discovering, registering, and retrieving
virtual machine images. Glance has a RESTful API that allows querying of
VM image metadata as well as retrieval of the actual image.
VM images made available through Glance can be stored in a variety of
locations from simple filesystems to object-storage systems like the
OpenStack Swift project.
This package contains the %{name} registry server.
%package scrubber
Summary: OpenStack Image service (Glance) - Scrubber
Requires: openstack-glance-common = %{version}-%{release}
%description scrubber
The Glance project provides a service where users can upload and discover
data assets that are meant to be used with other services. This currently
includes images and metadata definitions.
Glance image services include discovering, registering, and retrieving
virtual machine images. Glance has a RESTful API that allows querying of
VM image metadata as well as retrieval of the actual image.
VM images made available through Glance can be stored in a variety of
locations from simple filesystems to object-storage systems like the
OpenStack Swift project.
This package contains the %{name} scrubber server.
%package common
Summary: OpenStack Image service (Glance) - Common
Requires: python3-glance = %{version}-%{release}
%description common
The Glance project provides a service where users can upload and discover
data assets that are meant to be used with other services. This currently
includes images and metadata definitions.
Glance image services include discovering, registering, and retrieving
virtual machine images. Glance has a RESTful API that allows querying of
VM image metadata as well as retrieval of the actual image.
VM images made available through Glance can be stored in a variety of
locations from simple filesystems to object-storage systems like the
OpenStack Swift project.
This package contains scripts, config and dependencies shared between all the ${name} services.
%package -n python3-glance
Summary: OpenStack Image Service (Glance) - Python module
Requires: python3-paste
@ -223,12 +282,9 @@ This package contains the Glance test files.
%build
%{py3_build}
# regenerate the sample config files
for service in api scrubber cache manage image-import; do
for service in api registry scrubber cache manage image-import; do
PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/glance-$service.conf
done
# generate the sample policy
PYTHONPATH=. oslopolicy-sample-generator --config-file=etc/glance-policy-generator.conf --output etc/policy.json
rm -f etc/glance-policy-generator.conf
%install
%{py3_install}
@ -243,62 +299,96 @@ install -d -m 750 %{buildroot}%{_localstatedir}/cache/glance
install -d -m 700 %{buildroot}%{_rundir}/glance
# install sample configs
cp -pr etc/* %{buildroot}%{_sysconfdir}/glance
for service in api scrubber cache manage swift image-import; do
for service in api registry scrubber cache manage swift image-import; do
mv %{buildroot}%{_sysconfdir}/glance/glance-$service.conf{.sample,}
done
rm -rf %{buildroot}%{_sysconfdir}/glance/oslo-config-generator
# systemd
install -p -D -m 444 %{SOURCE2} %{buildroot}%{_unitdir}/openstack-glance-api.service
install -p -D -m 444 %{SOURCE10} %{buildroot}%{_unitdir}/openstack-glance-api.service
install -p -D -m 444 %{SOURCE11} %{buildroot}%{_unitdir}/openstack-glance-registry.service
install -p -D -m 444 %{SOURCE12} %{buildroot}%{_unitdir}/openstack-glance-scrubber.service
# logrotate
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-glance
install -p -D -m 644 %{SOURCE20} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-glance
# sudo
install -D -m 440 -p %{SOURCE30} %{buildroot}%{_sysconfdir}/sudoers.d/glance
# move metadefs
mv %{buildroot}%{_prefix}%{_sysconfdir}/glance/metadefs/* %{buildroot}%{_sysconfdir}/glance/metadefs
# Remove duplicate files under /usr/etc
rm -rf %{buildroot}%{_prefix}%{_sysconfdir}/glance
%pre
%check
stestr run --black-regex '(glance.tests.unit.common.test_format_inspector.TestFormatInspectors.test_vdi|glance.tests.unit.v2.test_tasks_resource.TestTasksController.test_create_with_live_time)'
%pre common
%openstack_pre_user_group_create glance glance /sbin/nologin
%check
stestr run --black-regex 'glance.tests.unit.common.test_format_inspector.TestFormatInspectors.test_vdi'
%post api
%systemd_post %{name}-api.service
%systemd_post openstack-glance-api.service
%post registry
%systemd_post openstack-glance-registry.service
%post scrubber
%systemd_post openstack-glance-scrubber.service
%preun api
%systemd_preun %{name}-api.service
%systemd_preun openstack-glance-api.service
%preun registry
%systemd_preun openstack-glance-registry.service
%preun scrubber
%systemd_preun openstack-glance-scrubber.service
%postun api
%systemd_postun_with_restart %{name}-api.service
%systemd_postun_with_restart openstack-glance-api.service
%postun registry
%systemd_postun_with_restart openstack-glance-registry.service
%postun scrubber
%systemd_postun_with_restart openstack-glance-scrubber.service
%files
%files api
%{_bindir}/glance-api
%{_bindir}/glance-wsgi-api
%{_unitdir}/openstack-glance-api.service
%config(noreplace) %attr(0640, glance, glance) %{_sysconfdir}/glance/glance-api.conf
%files registry
%{_bindir}/glance-registry
%{_unitdir}/openstack-glance-registry.service
%config(noreplace) %attr(0640, glance, glance) %{_sysconfdir}/glance/glance-registry.conf
%files scrubber
%{_bindir}/glance-scrubber
%{_unitdir}/openstack-glance-scrubber.service
%config(noreplace) %attr(0640, glance, glance) %{_sysconfdir}/glance/glance-scrubber.conf
%files common
%license LICENSE
%dir %attr(0750, root, glance) %{_sysconfdir}/glance
%dir %attr(0750, root, glance) %{_sysconfdir}/glance/glance.conf.d/
%dir %attr(0750, root, glance) %{_sysconfdir}/glance/glance-api.conf.d/
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-api.conf
%dir %attr(0750, glance, glance) %{_sysconfdir}/glance
%dir %attr(0750, glance, glance) %{_sysconfdir}/glance/glance.conf.d/
%dir %attr(0750, glance, glance) %{_sysconfdir}/glance/glance-api.conf.d/
%dir %attr(0750, glance, glance) %{_sysconfdir}/glance/metadefs
%dir %attr(0755, glance, glance) %{_localstatedir}/lib/glance
%dir %attr(0755, glance, glance) %{_localstatedir}/lib/glance/images
%dir %attr(0750, glance, glance) %{_localstatedir}/log/glance
%dir %attr(0750, glance, glance) %{_localstatedir}/cache/glance
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-cache.conf
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-image-import.conf
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-scrubber.conf
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-swift.conf
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-manage.conf
%config(noreplace) %attr(0440, root, root) %{_sysconfdir}/sudoers.d/glance
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config %{_sysconfdir}/glance/glance-api-paste.ini
%config %{_sysconfdir}/glance/glance-registry-paste.ini
%config %{_sysconfdir}/glance/policy.json
%config %{_sysconfdir}/glance/property-protections-policies.conf.sample
%config %{_sysconfdir}/glance/property-protections-roles.conf.sample
%config %{_sysconfdir}/glance/ovf-metadata.json.sample
%config %{_sysconfdir}/glance/schema-image.json
%dir %config %{_sysconfdir}/glance/metadefs
%{_sysconfdir}/glance/metadefs/README
%config %{_sysconfdir}/glance/metadefs/*.json
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%dir %attr(0755, glance, glance) %{_localstatedir}/lib/glance
%dir %attr(0755, glance, glance) %{_localstatedir}/lib/glance/images
%dir %attr(0750, glance, glance) %{_localstatedir}/log/glance
%dir %attr(0750, glance, glance) %{_localstatedir}/cache/glance
%{_sysconfdir}/glance/metadefs/README
%{_bindir}/glance-cache-cleaner
%{_bindir}/glance-cache-manage
%{_bindir}/glance-cache-prefetcher
@ -306,11 +396,7 @@ stestr run --black-regex 'glance.tests.unit.common.test_format_inspector.TestFor
%{_bindir}/glance-control
%{_bindir}/glance-manage
%{_bindir}/glance-replicator
%{_bindir}/glance-scrubber
%{_bindir}/glance-status
%{_unitdir}/openstack-glance-api.service
%{_bindir}/glance-api
%{_bindir}/glance-wsgi-api
%files -n python3-glance
%license LICENSE
@ -322,14 +408,14 @@ stestr run --black-regex 'glance.tests.unit.common.test_format_inspector.TestFor
%{python3_sitelib}/glance/tests
%changelog
* Mon Aug 23 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 22.0.0-2
- Remove useless temp file creat action
* Fri Dec 10 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 19.0.4-4
- Disable unstable unit test
* Thu Aug 12 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 22.0.0-1
- Upgrade to 22.0.0 for OpenStack Wallaby
* Thu Nov 25 2021 lijiawei <ljw1101.vip@gmail.com> - 19.0.4-3
- Update the spec structure
* Sat Feb 20 2021 zhaorenhai <zhaorenhai@hotmail.com> - 21.0.0-2
- Fix requires issue of python-migrate
* Mon Nov 15 2021 lijiawei <ljw1101.vip@gmail.com> - 19.0.4-2
- Fix the bugs about how to generate the etc/policy.json
* Tue Feb 09 2021 openstack-sig <openstack@openeuler.org> - 21.0.0-1
- Init 21.0.0 for OpenStack Victoria
* Fri Nov 05 2021 lijiawei <ljw1101.vip@gmail.com> - 19.0.4-1
- Support OpenStack Train release