Add the new hw_firmware_stateless image property, which is now used to
request launching instances with stateless firmware in nova.
Depends-on: https://review.opendev.org/c/openstack/nova/+/908890
Change-Id: I24868b89bc79eda5657a6e2a5e98fb8fa150b1f3
Some add location functional tests fail intermittently since
in current wait logic, wait call returns as soon as the image
reaches to expected status but hash calculation doens't get
completed sometimes within the provided time stamp.
Adding a separate wait method instead of modifying the existing
one, which will check checksum is set to image along with the
expected status.
Change-Id: Ie17dc6561e65fbf5d0b1669bd33cd30a53176d74
This removes glance's in-tree format_inspector implementation and
makes it use the newly-released oslo_utils' one. We need very few
changes for this to work, but this is the summary:
- Oslo's safety_check() raises instead of returns false
- Oslo uses InspectWrapper which does in-flight detection, which we
need to handle just a little differently.
- Oslo detects GPT-formatted disks as 'gpt' format, which we need to
consider as 'raw' for compatibility reasons.
Depends-On: https://review.opendev.org/c/openstack/tempest/+/927395
Change-Id: I7e32d5ae717224b504e06f7fccb854f68c713643
This change excludes image conversion if source image
format is ISO.
This change includes unit tests for the ISO
format inspector using mkisofs to generate
the iso files.
A test for stashing qcow content in the system_area
of an iso file is also included.
This change modifies format_inspector.detect_file_format
to evaluate all inspectors until they are complete and
raise an InvalidDiskInfo exception if multiple formats
match.
Related-Bug: #2059809
Change-Id: Id706480e31687d8ade6f7199b600aff3ad7c68f7
RBAC config options enforce_scope and enforce_new_defaults
were disabled by default in oslo.policy and Glance had to override
the default value to enable those by default. Now oslo.policy
(4.4.0 onwards[1]) changed the default values[2] and enabled
by default for all the services. OpenStack service does not need
to override the default anymore.
As every job run with glance new defaults:
- Removing glance-tox-functional-py39-rbac-defaults
- Add new periodic job to test old defaults
- tempest-integrated-storage-rbac-old-defaults
NOTE: There is no change in behaviour here, oslo.policy provides the
same configuration that Glance has overridden till now.
[1] https://review.opendev.org/c/openstack/releases/+/925032
[2] https://review.opendev.org/c/openstack/oslo.policy/+/924283
Depends-On: https://review.opendev.org/c/openstack/requirements/+/925464
Change-Id: Ib9a503783df6fb40058089319c7c8b7e9d89d3b8
Made changes to revert image state to `queued` and deleting image data
from staging area if image conversion fails. If image is importing to
multiple stores at a time then resetting the image properties
`os_glance_importing_to_stores` and `os_glance_failed_imports` to
reflect the actual result of the operation.
Closes-Bug: 2072483
Change-Id: I373dde3a07332184c43d9605bad7a59c70241a71
This will let downstream distros with qemu-img versions
that don't support the qed format pass unit tests without
having to patch this test out.
Change-Id: I50907c90686366cab12be072b53c65b048b7c510
This will eliminate the regression of adding the schema validation
in existing schema which is defined for image create/update API.
Change-Id: Icd704f37a0a770b6cad63207276825d97c87eb5b
Removing deprecated location_strategy functionality which was used
to prioritize location order for downloading the image.
The weighing mechanism introduced in the Bobcat development cycle
now should be used by operators who would like to prioritize
certain stores over others.
Change-Id: I7b760d2b28a8b289a303a0a9c1d91a9de0c7138a
This change adds a new location api GET
/v2/images/{image_id}/locations to get the locations associated
to the image.
This operation will be allowed to service user only,
and validated by the new policy rule `fetch_image_location`.
Implements: blueprint new-location-apis
Change-Id: I9d14465a83e76c73e12cec3b96d42e568ab97072
This change adds a new location api POST
/v2/images/{image_id}/locations to add the new location to
the image when in `queued` state only.
This operation will be service user & image owner only,
and validated by the new policy rule `add_image_location`.
Implements: blueprint new-location-apis
Change-Id: I238c21efd09de296e8928d8fa68bac4b41f81694
This change adds location_import task flow which includes
below tasks which are required for new add location api,
1. UpdateLocationTask
2. CalculateHash
3. VerifyValidationData
3. SetHashValues
4. SetImageToActiveTask
Related blueprint new-location-apis
Change-Id: Id5482582a29d947dcb74a506bf715cf6a2d05b3e
In case of glance multiple stores (mostly for ceph) nova initiates
copy-image functionality if image, from which the sever is being
created, is not present in the referring ceph store. This can fail if
image location which is already present in image but not available for
that glance edge node. This scenario can only be reproducible
with EDGE deployment.
In order to fix this, if the store is defined on that glance node
then only call set_acls method, else ignore it.
Closes-Bug: #2073945
Change-Id: I0409982ae27b662e60dd2363ba2f7863d0722fea
This reverts commit 244ccb68dd9c1be8b8c6223c50998464a394b688.
Reason for revert: disk-format list not required to be passed to the import jobs after the tempest change [1].
[1]: https://review.opendev.org/c/openstack/tempest/+/924252
Change-Id: Id2548fad3e90144b47964b82bb4f702ad6407ae2
The openstack-tox-functional-py38-fips job is based on centos-8-stream,
which is no longer working and will soon be dropped completely, so
remove the job.
Change-Id: Ie419f2cf9f685bba770b6b2c88571e41758cb212
This adds a safety check and detection mechanism to the
tools/test_format_inspector.py utility for verifying those features
outside of glance.
Change-Id: I447e7e51315472f8fa6013d4c4852f54c1e0c43d
When Glance is configured to use Cinder store and we upload
volume to Glance in the optimized path, it fails with
InvalidLocation error.
This happens because Cinder is not aware about the store
in which we will create the image and supplies the old
format URL i.e. cinder://<vol-id> whereas Glance expects
new location format i.e. cinder://<store-id>/<vol-id>.
Glance has code to update the format from old location format
to new location format but it isn't triggered in case of
old location APIs.
This patch adds the context to the update store ID request
which calls the Cinder store to provide the updated location,
hence fixing the optimized path for upload volume to image.
Closes-Bug: #2054575
Change-Id: Idd1cb8982b40b85a17821596f76dfa10207f6381
This reverts commit b75f3e4a4278f71d5379d40858df49c8920ca53d.
Reason for revert: Since we have landed all important patches on master branch, we can now revert this change and make jobs voting.
Change-Id: I2f5fa707a2cb7f6ffb38a8b919f224897684c795
The tempest-integrated-storage-import has been timing out
frequently around 2 hour 5 minutes mark and similarly one
of the jobs inheriting from it,
tempest-integrated-storage-import-standalone, also times
out around the same time. The timeout issue has increased
recently as can be seen in the job build history[1].
We had a similar issue with the glance-multistore-cinder-import
job for which we increased the timeout to 3 hours[2] but the
job completes successfully on average 2 hour 10 minutes
and has been completing in that time for more than 8 months
since the change to increase timout landed.
The underlying cause could be due to a lot of reasons:
1. Lower concurrency (3) as compared to parent job (6)
2. More number of tests being added to tempest
3. Slow Devstack installation
4. Slow tempest test execution
5. memory consumption of OpenStack services
increased making environment slow
6. no significant improvement in the hardware
specifications on which we run the job
This patch generalizes the timeout to the tempest-integrated-storage-import
job so all of it's child jobs also don't face similar timeouts.
Also we are updating timeout for tempest-integrated-storage-enforce-scope-new-defaults
job as we see similar time out issues in that job.
[1] https://zuul.opendev.org/t/openstack/builds?job_name=tempest-integrated-storage-import&skip=0
[2] 64e6da6fe1
Change-Id: I7165bb8c588659362b7b36394111c41772ac802d