8004 Commits

Author SHA1 Message Date
Dan Smith
f596965b60 Add QED format detection to format_inspector
This merely recognizes this format and always marks it as unsafe
because no service supports it. This prevents someone from uploading
one that we will ask qemu-img to inspect.

Change-Id: Ieea7b7eb0f380571bd4937cded920776e05f7ec4
2024-07-03 05:48:58 +00:00
Dan Smith
797e30e602 Reject unsafe qcow and vmdk files
This causes us to use the format inspector to pre-examine qcow and
vmdk files for safe configurations before even using qemu-img
on them.

Change-Id: I0554706368e573e11f649c09569f7c21cbc8634b
Closes-Bug: #2059809
2024-07-03 05:48:58 +00:00
Dan Smith
e18ebdd118 Add VMDK safety check
This makes us check the extent filenames to make sure they don't
have any banned characters in them (i.e. slashes). It also makes
us reject VMDK files with a footer. Since we process these files
as a stream, we can't honor a footer that directs us to find the
descriptor block in a location we've already processed. Thus, if
a file indicates it has a footer, consider it a policy exception
and unsupported.

Change-Id: I4a1c6dff7854c49940a0ac7988722aa6befc04fa
2024-07-03 05:48:58 +00:00
Dan Smith
58a9e15a8d Extend format_inspector for QCOW safety
This adds two properties to the QcowInspector that makes it able to
indicate whether the file specifies a backing_file or data_file in the
header. Both conditions are considered unsafe for our usage. To
ease checking of this condition, a classmethod is added that takes
a local filename and digests just enough of the file to assert that
both conditions are false.

Change-Id: Iaf86b525397d41bd116999cabe0954a0a7efac65
Related-Bug: #2059809
2024-07-03 05:48:58 +00:00
Dan Smith
937f7d3e29 Reject qcow files with data-file attributes
Change-Id: I6326a3e85c1ba4cb1da944a4323769f2399ed2c1
Closes-Bug: #2059809
2024-07-03 05:48:58 +00:00
Abhishek Kekane
244ccb68dd Fix import job to provide valid disk-formats list to tempest
Recent changes does not allow image conversion to convert an image
having AMI disk format for image. Passing list of disk-formats to
each import job which will now use qcow2 as default disk-format to
create the image.

Change-Id: I712b304ebe168705ec2793626f5d64135ad6d458
2024-07-02 19:27:49 +00:00
Zuul
7cfa378b2f Merge "Release notes for Dalmatian Milestone 2" 2024-07-02 13:44:10 +00:00
Pranali Deore
006ef41c0b Deprecate the "metadata_encryption_key" option
Change-Id: I15d388793f12ad8305095b0993a4e70d1bea6851
2024-07-02 09:46:13 +00:00
Pranali Deore
3471d6b76e Release notes for Dalmatian Milestone 2
Change-Id: Ib6f4ce7ba6a34b81fecf30e109574b026e7418ae
2024-06-28 14:17:29 +00:00
Pranali Deore
1c523cf94e Make location URL compatible with cinder backend
While adding location to an image, cinder sends location url as
`cinder://volume_id` for single as well as multistore which is
incompatible with glance multistore and store throws
InvalidLoctation error.

Modifying the location url to be compatible with multistore as
`cinder://store_id/volume_id` to avoid Invalid Location error.

Related-Bug: #2054575
Change-Id: I5f791c58ae857f6c553276dd9808799c3db3aa4f
2024-06-28 12:13:47 +00:00
Zuul
4dec531b0a Merge "Use constants for common rules" 2024-06-28 11:43:24 +00:00
Zuul
2e6afec7a3 Merge "Drop sqlparse" 2024-06-25 18:04:40 +00:00
Tony Breeds
74acd8214f Drop sqlparse
Based on:

tony@thor:~/src/opendev.org/openstack$ beagle --server https://codesearch.openstack.org search -f grep sqlparse | grep ^openstack | grep -v '/requirements'
openstack/glance:requirements.txt:10:sqlparse>=0.2.2 # BSD
openstack/kolla:docker/openstack-base/Dockerfile.j2:175:'sqlparse',
openstack/rpm-packaging:openstack/glance/glance.spec.j2:54:BuildRequires:  {{ py3('sqlparse') }}
openstack/rpm-packaging:openstack/glance/glance.spec.j2:134:Requires:       {{ py3('sqlparse') }}
openstack/rpm-packaging:openstack/keystone/keystone.spec.j2:47:BuildRequires:  {{ py3('sqlparse') }}

It looks like sqlparse is no longer needed by glance.  If we drop it
from glance, we can drop it altogether from OpenStack Requirements.

Change-Id: I113b4c75e0674657d0fe50af9721f67fd2ec386f
2024-06-24 17:43:26 +10:00
Zuul
cfc9c0eb1a Merge "Make functional-py312 voting and add it to the gate" 2024-06-21 01:21:23 +00:00
Stephen Finucane
1b11e6e3a2 docs: Correct grammar nit
Change-Id: Ibc23331263444f9193963db72b7fde1820f4e942
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2024-06-18 11:11:59 +01:00
Pranali Deore
06c727cfb3 Fix 500 if multi-tenant swift is used
1. store-info --details and image-create apis fail with 500 if
   swift configuration file is set in g-api.conf when muti-tenant
   swift store is used. Fixed this by excluding the unregistered
   conf parameter and added log warning.
2. Also, store-info --details fails with AttributeError, when
   multitenant is enabled for swift store since it doesn not set
   the container value during store configuration.
   Fixed this by returing `None` incase of multitenant swift store.

Closes-Bug: #2061947
Change-Id: I6cbd11fd0ee5758169a2e0e9961660edb844e65f
2024-06-12 07:58:06 +00:00
Pranali Deore
dfbfdad77f Move all periodic tips jobs from py38/39 to py311/312
Since the abstract base periodic tips jobs are now using
ubuntu-jammy by default [1], we can move the py3.8 jobs to
py3.11.

To move the py3.9 jobs to python 3.12, we follow what change
If42cb167c339 did for the the openstack-tox-py312 job and use
debian-bookworm with the pyenv flag set.

[1]: https://review.opendev.org/c/openstack/glance/+/894511

Depends-on: https://review.opendev.org/c/openstack/glance-tempest-plugin/+/916332
Change-Id: I113c098cb6b6c3b74414cbab3bf5c05ee69606d9
2024-05-29 20:48:10 +00:00
Cyril Roelandt
95abad115b Make functional-py312 voting and add it to the gate
Change-Id: If9238dc4243b1bd23ee0a61a1531ff784ad19655
2024-05-28 17:09:49 +02:00
OpenStack Proposal Bot
3f49730e62 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I9050a3cc75147febc1862c6daa929c0d8d25179a
2024-05-23 04:23:16 +00:00
Cyril Roelandt
9f4754cd80 Add non-voting functional-py312 job
Change-Id: I8acd8af259890533bc6420f8591af468759ef020
2024-05-21 18:12:49 +02:00
Zuul
da1b9792f2 Merge "Docs: be more explicit regarding oslo_limit.endpoint_id" 2024-05-17 07:38:23 +00:00
Zuul
705b145ab8 Merge "Refresh Glance example configs for dalmatian m1" 29.0.0.0b1 2024-05-16 06:58:41 +00:00
Zuul
0b2662a352 Merge "Release notes for Dalmatian Milestone 1" 2024-05-16 05:32:45 +00:00
Zuul
16d7e03f01 Merge "Remove sendfile support" 2024-05-16 04:02:32 +00:00
Zuul
462ac84445 Merge "Remove SQLAlchemy tips jobs" 2024-05-14 13:21:36 +00:00
Zuul
6b000ab871 Merge "Architecture docs: Fix list indentation" 2024-05-14 09:41:50 +00:00
Zuul
7c51a9ce44 Merge "Remove ubuntu focal job" 2024-05-14 09:41:48 +00:00
Zuul
31b51c56aa Merge "Do not load api-paste.ini using oslo.config" 2024-05-14 09:41:46 +00:00
Pranali Deore
0812f97004 Refresh Glance example configs for dalmatian m1
Change-Id: I2d1cf3567eb938f05a64bb0af5e2e78321eaaa4a
2024-05-09 06:30:59 +00:00
Pranali Deore
547a481399 Release notes for Dalmatian Milestone 1
Change-Id: I793c90ee575d18f44298238c45f27e3b14130142
2024-05-09 05:52:22 +00:00
Abhishek Kekane
32ee57ccde Fix broken glance-cache-prefetcher utility
glance-cache-preftecher utility was failing because it was not
setting global threadpool model while initilizing the tool.

Closes-Bug: #2065087
Change-Id: I0c09dd7c0d81178ebf2aa5efd19c54866fc8791b
2024-05-07 18:16:03 +00:00
Takashi Kajinami
ef58d77be0 Stop using deprecated defusedxml.cElementTree
defusedxml.cElementTree was deprecated in defusedxml 0.7.0[1] .

[1] https://pypi.org/project/defusedxml/#defusedxml-0-7-0rc2

Change-Id: Ic51de5ba8179708c946e42b9f2e504750c57710e
2024-05-08 03:13:48 +09:00
Takashi Kajinami
205ca3336a Remove sendfile support
pysendfile[1] was added as an optional dependency but the library
hasn't been maintained and has got no release since 2014.

What is worse, the sendfile implementation is not actually working
since The SendFileIterator class was removed[2]. (Follow-up[3] removed
the remaining reference to the class). The broken implementation has
not been detected because the client is not currently used to upload
contents.

Remove the incomplete implementation to get rid of the dependency on
the unmaintained library.

[1] https://pypi.org/project/pysendfile/
[2] 76c3620c7effb15be577450c276db1e394c2de3e
[3] 0c151d7d7ea00627fad182898958db55b1fef3fd

Closes-Bug: #2062573
Change-Id: Ia4784f59d16660e8d40c0e409f092ac4e46870b4
2024-05-02 09:20:59 +00:00
Zuul
95770a25e3 Merge "refectory: fix comments" 2024-05-02 05:20:02 +00:00
Zuul
02fbc47733 Merge "Change DB migration constant to 2024_2" 2024-04-30 13:55:17 +00:00
Zuul
8bf8994428 Merge "Remove the digest_algorithm option" 2024-04-30 13:55:15 +00:00
Zuul
897f0727d8 Merge "doc: Remove non-existing auth parameters of glance-cache.conf" 2024-04-30 13:25:40 +00:00
Zuul
a8e60b825b Merge "Remove glossary" 2024-04-30 13:25:38 +00:00
Zuul
4c9aec7349 Merge "Remove allow_additional_image_properties" 2024-04-30 13:25:35 +00:00
Zuul
e176ec931d Merge "reno: Update master for unmaintained/zed" 2024-04-30 11:42:36 +00:00
1708fd7cdb reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: Iac00323daf3872385a9012ab107336ec943bade3
2024-04-30 09:14:09 +00:00
Zuul
79f128746c Merge "Cinder: Remove ambiguous warning" 2024-04-30 03:07:33 +00:00
Takashi Kajinami
2435122933 Remove glossary
This is not really actively maintained and is duplicate of the one
available in openstack-manuals.

Change-Id: I6617397585e49501a20e758877c4071a1f3b9d84
2024-04-30 01:51:31 +09:00
Zuul
7b6e891559 Merge "doc: remove trailing dot from hypervisor_type list" 2024-04-23 21:23:06 +00:00
Cyril Roelandt
a7c878eed9 Remove allow_additional_image_properties
This option has been deprecated since Ussuri.

Change-Id: Ib3016f7b4b841543b02710c496e8387e63ed36c3
2024-04-23 18:32:58 +02:00
Zuul
b8375913bf Merge "Replace remaining usage of [DEFAULT] sql_connection" 2024-04-19 05:27:57 +00:00
Takashi Kajinami
b38a567ad4 Replace remaining usage of [DEFAULT] sql_connection
The previous attempt[1] was incomplete and these was still one usage
left. The deprecated alias was removed from oslo.db[2] and no longer
works.

[1] b6b9f043ffe664c643456912148648ecc0d6c9b4
[2] bf90aed0f7b19441644de2be807ec680ad86b1b1

Change-Id: Ib3b0271057578a64ae556a11224e3b366ddf89bf
2024-04-18 16:51:40 +00:00
Pranali Deore
4b4e36f160 Change DB migration constant to 2024_2
Change-Id: I8b1dcb76d16ebd6a2c90b75b6ad3de34be3cba99
2024-04-18 05:42:40 +00:00
Cyril Roelandt
3a821c41cc Architecture docs: Fix list indentation
Closes-Bug: #2061813
Change-Id: Ib982b9375e63e3248b298678b6caa75e4c4b2318
2024-04-17 01:50:45 +02:00
Takashi Kajinami
835e7f36a5 Remove unused run_sql_cmd
The run_sql_cmd method in functional tests is not used. The method uses
Engine.execute() method which was removed in 2.0.

Change-Id: I6f9ea1dfd852a2d311e17964da0ea56c052b3fda
2024-04-15 11:54:16 +09:00