Skip to content

Conversation

github-actions[bot]
Copy link

This PR contains a snapshot of zed from upstream unmaintained/zed.

jayofdoom and others added 10 commits June 19, 2024 17:45
list_instances and list_instance_uuids, as written in the Ironic driver,
do not currently respect conductor_group paritioning. Given a nova
compute is intended to limit it's scope of work to the conductor group
it is configured to work with; this is a bug.

Additionally, this should be a significant performance boost for a
couple of reasons; firstly, instead of calling the Ironic API and
getting all nodes, instead of the subset (when using conductor group),
we're now properly getting the subset of nodes -- this is the optimized
path in the Ironic DB and API code. Secondly, we're now using the
driver's node cache to respond to these requests. Since list_instances
and list_instance_uuids is used by periodic tasks, these operating with
data that may be slightly stale should have minimal impact compared to
the performance benefits.

Closes-bug: #2043036
Change-Id: If31158e3269e5e06848c29294fdaa147beedb5a5
(cherry picked from commit fa3cf7d)
(cherry picked from commit 555d7d0)
(cherry picked from commit 3226318)
It has been asserted that we should not be calling qemu-img info
on untrusted files. That means we need to know if they have a
backing_file, data_file or other unsafe configuration *before* we use
qemu-img to probe or convert them.

This grafts glance's format_inspector module into nova/images so we
can use it to check the file early for safety. The expectation is that
this will be moved to oslo.utils (or something) later and thus we will
just delete the file from nova and change our import when that happens.

NOTE: This includes whitespace changes from the glance version of
format_inspector.py because of autopep8 demands.

Change-Id: Iaefbe41b4c4bf0cf95d8f621653fdf65062aaa59
Closes-Bug: #2059809
(cherry picked from commit 9cdce71)
(cherry picked from commit f07fa55)
(cherry picked from commit 0acf5ee)
(cherry picked from commit 67e5376)
There is an additional way we can be fooled into using a qcow2 file
with a data-file, which is uploading it as raw to glance and then
booting an instance from it. Because when we go to create the
ephemeral disk from a cached base image, we've lost the information
about the original source's format, we probe the image's file type
without a strict format specified. If a qcow2 file is listed in
glance as a raw, we won't notice it until it is too late.

This brings over another piece of code (proposed against) glance's
format inspector which provides a safe format detection routine. This
patch uses that to detect the format of and run a safety check on the
base image each time we go to use it to create an ephemeral disk
image from it.

This also detects QED files and always marks them as unsafe as we do
not support that format at all. Since we could be fooled into
downloading one and passing it to qemu-img if we don't recognize it,
we need to detect and reject it as unsafe.

Conflicts:
  nova/tests/unit/virt/libvirt/test_utils.py
  nova/virt/libvirt/utils.py

NOTE(elod.illes): conflicts are due to encryption support adding patch
I5d6d2a7b03b5ace0826af80c4004de852579ff12 was introduced in zed.

Change-Id: I4881c8cbceb30c1ff2d2b859c554e0d02043f1f5
(cherry picked from commit b1b88bf)
(cherry picked from commit 8a0d5f2)
(cherry picked from commit 0269234)
(cherry picked from commit 9e10ac2)
This restores the vmdk_allowed_types checking in create_image()
that was unintentionally lost by tightening the
qemu-type-matches-glance code in the fetch patch recently. Since we
are still detecting the format of base images without metadata, we
would have treated a vmdk file that claims to be raw as raw in fetch,
but then read it like a vmdk once it was used as a base image for
something else.

Conflicts:
  nova/tests/unit/virt/libvirt/test_utils.py

NOTE(elod.illes): conflicts are due to encryption support adding patch
I5d6d2a7b03b5ace0826af80c4004de852579ff12 was introduced in zed.

Change-Id: I07b332a7edb814f6a91661651d9d24bfd6651ae7
Related-Bug: #2059809
(cherry picked from commit 08be7b2)
(cherry picked from commit 11301e7)
(cherry picked from commit 70a435f)
(cherry picked from commit f732f84)
And exclude a flaky test case[1] as well to make the gate more stable.

[1] test_instances_with_cinder_volumes_on_all_compute_nodes

Change-Id: I3c69a20993bca066ece46eed16d4e897144524cd
…enable

Since e222cc976918a331bacff150e84069fda8f4960a, it is possible to set
the minimum client version. The goal of this patch is to enable the
*mimic* client version for the current cinder-plugin-ceph-tempest job.

As a result, we will be able to ensure that snapshots can be deleted
when a volume is cloned from them.

So that we can reduce the excluded test cases while keeping the gate
functional.

Change-Id: I441d0513a6547b2fbae011b7e9dad7d6a51398a6
@github-actions github-actions bot requested a review from a team as a code owner July 15, 2024 08:23
@github-actions github-actions bot added automated Automated action performed by GitHub Actions synchronisation labels Jul 15, 2024
@markgoddard markgoddard merged commit b69ae07 into stackhpc/zed Jul 16, 2024
@markgoddard markgoddard deleted the upstream/zed-2024-07-15 branch July 16, 2024 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated Automated action performed by GitHub Actions synchronisation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants