Upgrade to 22.0.0 for OpenStack Wallaby

This commit is contained in:
wangxiyuan 2021-08-12 15:35:52 +08:00
parent a720f70d00
commit 4ff3118ccb
6 changed files with 140 additions and 208 deletions

Binary file not shown.

BIN
glance-22.0.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,30 +0,0 @@
The main service configuration (/etc/$project/$project.conf) can still be used
for configuration but the preferred way is to add config file snippets into
/etc/$project/$project.conf.d/ instead.
As part of the packaging, the package itself installs a config snippet at
/etc/$project/$project.conf.d/010-$project.conf with basic configuration. This
file should not be modified. In case there is a need to overwrite or add
settings, a XXX-$project.conf (XXX being a 3 digit number) should be created
instead.
Config directory file snippet naming should follow these conventions:
- snippets should start with "XXX-" where "X" is a number
- snippets must end with ".conf"
- config management systems (Crowbar, Salt, ...) should use numbers
between 100 and 499
- users should use numbers starting from 500
Configuring just a single $program (eg for Nova, $project is "nova" and
$program is "nova-api", "nova-compute", "nova-scheduler", ...) can be done
in a similar way. The config snippets should be placed in
/etc/$project/$program.conf.d/ . The same snippets rules apply here, too.
$program reads the configuration files in the following order:
- /etc/$project/$project.conf
- /etc/$project/$project.conf.d/*.conf (lexically sorted)
- /etc/$project/$program.conf.d/*.conf (lexically sorted)
The last configured key overwrites all previous ones. In particular, settings
in /etc/$project/$project.conf are overwritten by config values from any file
in /etc/$project/$project.conf.d/XXX-$project.conf .

View File

@ -1 +0,0 @@
d /run/glance 0755 glance glance -

View File

@ -1,6 +0,0 @@
[DEFAULT]
log_dir=/var/log/glance
lock_path=/run/glance
[paste_deploy]
flavor=keystone

View File

@ -1,83 +1,86 @@
%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%endif
%if 0%{?rhel} == 7
%global skip_python3 1
%endif
%global with_doc 1
%if 0%{?rhel} || 0%{?fedora}
%global rdo 1
%endif
%global with_check 0
Name: openstack-glance
Version: 21.0.0
Release: 2%{?dist}
Epoch: 0
Version: 22.0.0
Release: 1
Summary: OpenStack Image Service (Glance)
License: ASL 2.0
URL: https://docs.openstack.org/glance
Source0: glance-%{version}.tar.gz
Source0: https://tarballs.opendev.org/openstack/glance/glance-22.0.0.tar.gz
Source1: openstack-glance.logrotate
Source2: openstack-glance.conf
Source3: openstack-glance-api.service
Source6: openstack-glance.defaultconf
Source7: openstack-glance.README.config
BuildRequires: openstack-macros
BuildRequires: python3-paste
BuildRequires: python3-paste-deploy
BuildRequires: python3-routes
BuildRequires: python3-wsme
BuildRequires: python3-webob
BuildRequires: python3-cursive
BuildRequires: python3-ddt
BuildRequires: python3-debtcollector
BuildRequires: python3-defusedxml
BuildRequires: python3-eventlet
BuildRequires: python3-futurist
BuildRequires: python3-glance-store
BuildRequires: python3-httplib2
BuildRequires: python3-keystoneclient
BuildRequires: python3-keystonemiddleware
BuildRequires: python3-oslo-concurrency
BuildRequires: python3-oslo-config
BuildRequires: python3-oslo-context
BuildRequires: python3-oslo-db
BuildRequires: python3-oslo-log
BuildRequires: python3-oslo-messaging
BuildRequires: python3-oslo-middleware
BuildRequires: python3-oslo-policy
BuildRequires: python3-oslo-reports
BuildRequires: python3-oslo-upgradecheck
BuildRequires: python3-oslo-utils
BuildRequires: python3-oslotest
BuildRequires: python3-osprofiler
BuildRequires: python3-pyOpenSSL
BuildRequires: python3-retrying
BuildRequires: python3-sqlparse
BuildRequires: python3-stestr
BuildRequires: python3-stevedore
BuildRequires: python3-taskflow
BuildRequires: python3-pyxattr
Requires: logrotate
Requires: python3-glance = %{epoch}:%{version}-%{release}
Source2: openstack-glance-api.service
BuildRequires: openstack-macros
BuildRequires: qemu-img
BuildRequires: systemd
BuildRequires: python3-paste
BuildRequires: python3-paste-deploy
BuildRequires: python3-prettytable
BuildRequires: python3-routes
BuildRequires: python3-sqlalchemy
BuildRequires: python3-wsme
BuildRequires: python3-webob
BuildRequires: python3-alembic
BuildRequires: python3-cryptography
BuildRequires: python3-castellan
BuildRequires: python3-cursive
BuildRequires: python3-debtcollector
BuildRequires: python3-defusedxml
BuildRequires: python3-eventlet
BuildRequires: python3-futurist
BuildRequires: python3-glance-store
BuildRequires: python3-httplib2
BuildRequires: python3-iso8601
BuildRequires: python3-jsonschema
BuildRequires: python3-keystoneauth1
BuildRequires: python3-keystoneclient
BuildRequires: python3-keystonemiddleware
BuildRequires: python3-oslo-concurrency
BuildRequires: python3-oslo-config
BuildRequires: python3-oslo-context
BuildRequires: python3-oslo-db
BuildRequires: python3-oslo-i18n
BuildRequires: python3-oslo-log
BuildRequires: python3-oslo-messaging
BuildRequires: python3-oslo-middleware
BuildRequires: python3-oslo-policy
BuildRequires: python3-oslo-reports
BuildRequires: python3-oslo-upgradecheck
BuildRequires: python3-oslo-utils
BuildRequires: python3-osprofiler
BuildRequires: python3-pbr
BuildRequires: python3-pyOpenSSL
BuildRequires: python3-retrying
BuildRequires: python3-six
BuildRequires: python3-sqlalchemy-migrate
BuildRequires: python3-sqlparse
BuildRequires: python3-stevedore
BuildRequires: python3-taskflow
BuildRequires: python3-hacking
BuildRequires: python3-babel
BuildRequires: python3-coverage
BuildRequires: python3-ddt
BuildRequires: python3-fixtures
BuildRequires: python3-requests
BuildRequires: python3-testrepository
BuildRequires: python3-testresources
BuildRequires: python3-testscenarios
BuildRequires: python3-testtools
BuildRequires: python3-psutil
BuildRequires: python3-oslotest
BuildRequires: python3-stestr
BuildRequires: python3-doc8
BuildRequires: python3-pygments
BuildRequires: python3-boto3
BuildRequires: python3-PyMySQL
BuildRequires: python3-psycopg2
BuildRequires: python3-pysendfile
BuildRequires: python3-xattr
BuildRequires: python3-swiftclient
BuildRequires: python3-cinderclient
BuildRequires: python3-os-brick
BuildRequires: python3-oslo-privsep
Requires: openstack-glance-api = %{version}-%{release}
BuildArch: noarch
%if 0%{?suse_version}
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%else
BuildRequires: systemd
Requires(post): systemd
Requires(postun): systemd
Requires(preun): systemd
%endif
%if 0%{?suse_version}
BuildRequires: qemu-tools
Requires(pre): pwdutils
%endif
%if 0%{?rdo}
Requires(pre): shadow-utils
%endif
%description
The Glance project provides a service where users can upload and discover
@ -90,9 +93,31 @@ 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.
%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
%description api
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} API server.
%package -n python3-glance
Summary: OpenStack Image Service (Glance) - Python module
Group: Applications/System
Requires: python3-paste
Requires: python3-paste-deploy
Requires: python3-prettytable
@ -102,6 +127,7 @@ Requires: python3-wsme
Requires: python3-webob
Requires: python3-alembic
Requires: python3-cryptography
Requires: python3-castellan
Requires: python3-cursive
Requires: python3-debtcollector
Requires: python3-defusedxml
@ -114,7 +140,6 @@ Requires: python3-jsonschema
Requires: python3-keystoneauth1
Requires: python3-keystoneclient
Requires: python3-keystonemiddleware
Requires: python3-monotonic
Requires: python3-oslo-concurrency
Requires: python3-oslo-config
Requires: python3-oslo-context
@ -152,8 +177,31 @@ This package contains the Glance Python library.
%package -n python3-glance-tests
Summary: Glance tests
Requires: openstack-glance = %{epoch}:%{version}-%{release}
Provides: python-glance-tests = %{epoch}:%{version}-%{release}
Requires: python3-glance = %{version}-%{release}
Requires: python3-hacking
Requires: python3-babel
Requires: python3-coverage
Requires: python3-ddt
Requires: python3-fixtures
Requires: python3-requests
Requires: python3-testrepository
Requires: python3-testresources
Requires: python3-testscenarios
Requires: python3-testtools
Requires: python3-psutil
Requires: python3-oslotest
Requires: python3-stestr
Requires: python3-doc8
Requires: python3-pygments
Requires: python3-boto3
Requires: python3-PyMySQL
Requires: python3-psycopg2
Requires: python3-pysendfile
Requires: python3-xattr
Requires: python3-swiftclient
Requires: python3-cinderclient
Requires: python3-os-brick
Requires: python3-oslo-privsep
%description -n python3-glance-tests
The Glance project provides a service where users can upload and discover
@ -168,59 +216,12 @@ OpenStack Swift project.
This package contains the Glance test files.
%if 0%{?with_doc}
%package doc
Summary: Documentation for OpenStack Image Service
Group: Documentation
BuildRequires: python3-sphinx
BuildRequires: python3-openstackdocstheme
BuildRequires: python3-sphinxcontrib-apidoc
%description doc
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 documentation.
%endif
%package api
Summary: OpenStack Image service (Glance) - API
Group: Development/Languages/Python
Requires: %{name} = %{epoch}:%{version}-%{release}
%description api
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} API server.
%prep
%autosetup -p1 -n glance-%{version}
%py_req_cleanup
%build
%{py3_build}
# build documentation
%if 0%{?with_doc}
PBR_VERSION=%{version}-%{release} sphinx-build -b html doc/source doc/build/html
PBR_VERSION=%{version}-%{release} sphinx-build -b man doc/source doc/build/man
rm -rf doc/build/html/.{doctrees,buildinfo}
rm -rf doc/build/man/.{doctrees,buildinfo}
%endif
# regenerate the sample config files
for service in api scrubber cache manage image-import; do
PYTHONPATH=. oslo-config-generator --config-file etc/oslo-config-generator/glance-$service.conf
@ -240,19 +241,15 @@ install -d -m 755 %{buildroot}%{_localstatedir}/lib/glance/images
install -d -m 750 %{buildroot}%{_localstatedir}/log/glance
install -d -m 750 %{buildroot}%{_localstatedir}/cache/glance
install -d -m 700 %{buildroot}%{_rundir}/glance
# tmpfile generator
install -D -m 644 %{SOURCE2} %{buildroot}/%{_tmpfilesdir}/glance.conf
# install sample configs
cp -pr etc/* %{buildroot}%{_sysconfdir}/glance
for service in api scrubber cache manage swift image-import; do
mv %{buildroot}%{_sysconfdir}/glance/glance-$service.conf{.sample,}
done
install -p -D -m 640 %{SOURCE6} %{buildroot}%{_sysconfdir}/glance/README.config
rm -rf %{buildroot}%{_sysconfdir}/glance/oslo-config-generator
# default config
install -D -m 640 %{SOURCE6} %{buildroot}/%{_sysconfdir}/glance/glance.conf.d/010-glance.conf
# systemd
install -p -D -m 444 %{SOURCE3} %{buildroot}%{_unitdir}/openstack-glance-api.service
install -p -D -m 444 %{SOURCE2} %{buildroot}%{_unitdir}/openstack-glance-api.service
# logrotate
install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/logrotate.d/openstack-glance
# move metadefs
@ -260,23 +257,11 @@ mv %{buildroot}%{_prefix}%{_sysconfdir}/glance/metadefs/* %{buildroot}%{_sysconf
# Remove duplicate files under /usr/etc
rm -rf %{buildroot}%{_prefix}%{_sysconfdir}/glance
# man pages
%if 0%{?with_doc}
mkdir -p %{buildroot}%{_mandir}/man1
install -p -D -m 644 doc/build/man/*.1 %{buildroot}%{_mandir}/man1/
%endif
%pre
%openstack_pre_user_group_create glance glance /sbin/nologin
%check
%if 0%{?with_check}
%if 0%{?rdo}
# Skip qemu-tools related tests, those fail on RDO due to missing VDI support
rm -v glance/tests/unit/common/test_format_inspector.py
%endif
PYTHONPATH=. python3 -m stestr.cli --test-path glance/tests/unit run
%endif
stestr run --black-regex 'glance.tests.unit.common.test_format_inspector.TestFormatInspectors.test_vdi'
%post
%tmpfiles_create %{_tmpfilesdir}/glance.conf
@ -291,13 +276,12 @@ PYTHONPATH=. python3 -m stestr.cli --test-path glance/tests/unit run
%systemd_postun_with_restart %{name}-api.service
%files
%files api
%license LICENSE
%_tmpfilesdir/glance.conf
%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.conf.d/010-glance.conf
%{_sysconfdir}/glance/README.config
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-api.conf
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-cache.conf
%config(noreplace) %attr(0640, root, glance) %{_sysconfdir}/glance/glance-image-import.conf
@ -327,16 +311,9 @@ PYTHONPATH=. python3 -m stestr.cli --test-path glance/tests/unit run
%{_bindir}/glance-replicator
%{_bindir}/glance-scrubber
%{_bindir}/glance-status
%if 0%{?with_doc}
%{_mandir}/man1/glance-cache-cleaner.1.gz
%{_mandir}/man1/glance-cache-manage.1.gz
%{_mandir}/man1/glance-cache-prefetcher.1.gz
%{_mandir}/man1/glance-cache-pruner.1.gz
%{_mandir}/man1/glance-control.1.gz
%{_mandir}/man1/glance-manage.1.gz
%{_mandir}/man1/glance-replicator.1.gz
%{_mandir}/man1/glance-scrubber.1.gz
%endif
%{_unitdir}/openstack-glance-api.service
%{_bindir}/glance-api
%{_bindir}/glance-wsgi-api
%files -n python3-glance
%license LICENSE
@ -347,20 +324,12 @@ PYTHONPATH=. python3 -m stestr.cli --test-path glance/tests/unit run
%license LICENSE
%{python3_sitelib}/glance/tests
%if 0%{?with_doc}
%files doc
%license LICENSE
%doc doc/build/html
%endif
%files api
%{_unitdir}/openstack-glance-api.service
%{_bindir}/glance-api
%{_bindir}/glance-wsgi-api
%if 0%{?with_doc}
%{_mandir}/man1/glance-api.1.gz
%endif
%changelog
* Thu Aug 12 2021 wangxiyuan <wangxiyuan1007@gmail.com> - 22.0.0-1
- Upgrade to 22.0.0 for OpenStack Wallaby
* Sat Feb 20 2021 zhaorenhai <zhaorenhai@hotmail.com> - 21.0.0-2
- Fix requires issue of python-migrate
* Tue Feb 09 2021 openstack-sig <openstack@openeuler.org> - 21.0.0-1
- Init 21.0.0 for OpenStack Victoria