Skip to content

Conversation

m-bull
Copy link

@m-bull m-bull commented Jul 24, 2024

No description provided.

kk7ds and others added 2 commits July 24, 2024 19:00
When we moved the qemu-img command in fetch_to_raw() to force the
format to what we expect, we lost the ability to identify and react
to situations where qemu-img detected a file as a format that is not
supported by us (i.e. identfied and safety-checked by
format_inspector). In the case of some of the other VMDK variants
that we don't support, we need to be sure to catch any case where
qemu-img thinks it's something other than raw when we think it is,
which will be the case for those formats we don't support.

Note this also moves us from explicitly using the format_inspector
that we're told by glance is appropriate, to using our own detection.
We assert that we agree with glance and as above, qemu agrees with
us. This helps us avoid cases where the uploader lies about the
image format, causing us to not run the appropriate safety check.
AMI formats are a liability here since we have a very hard time
asserting what they are and what they will be detected as later in
the pipeline, so there is still special-casing for those.

Closes-Bug: #2071734
Change-Id: I4b792c5bc959a904854c21565682ed3a687baa1a
(cherry picked from commit 8b4c522)
Change-Id: I3b38344a127764b4fa62fe062e825074d6deab60
(cherry picked from commit 416ac36)
@m-bull m-bull requested a review from a team as a code owner July 24, 2024 18:08
markgoddard
markgoddard previously approved these changes Jul 25, 2024
@markgoddard
Copy link

Test failures look unrelated

This is not supported on Python 3.8 [1]. I have no idea why this was not
failing CI.

[1] https://docs.python.org/3.9/library/stdtypes.html#str.removeprefix

Change-Id: I225e9ced0f75c415b1d2fee05440291e3d8635c0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
(cherry picked from commit 3ccf82e)
@priteau
Copy link
Member

priteau commented Jul 25, 2024

I pushed an additional commit which should fix unit tests.

@markgoddard markgoddard merged commit 69709c1 into stackhpc/zed Jul 25, 2024
@markgoddard markgoddard deleted the zed-ossa-2024-002 branch July 25, 2024 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants