For blank files that are created by nova such as swap
disks and ephemeral disks we do not need need to safety
check them as they always are just bare filesystems.
In the future we should refactor the qcow imagebackend to
not require backing files for swap and ephemeral disks
but for now we simply disable the check to workaround
the addition of the gpt image inspector and the incompatiblity
with vfat. future versions of oslo will account for vfat boot
recored. this is a minimal patch to avoid needing a new oslo
release for 2024.2
Closes-Bug: #2079850
Change-Id: I7df3d9859aa4be3a012ff919f375a7a3d9992af4
This commit add a functional repoducer for a regression
in ephmeral disk image format validation
When we changed to use the oslo.utils verison of the
format_inspector we aquired a new inspector which can
detect if a file has a partition table.
As the qcow 2 backend does not know that ephemeral disk
or swap disk are not boot able it requires that they
also have partition tables.
Related-Bug: #2079850
Change-Id: I26c6e8d2efbf7403542e99b8ac45e2a31f08afd1
Since the commit the remove AMI snapshot format special casing
has merged, we're now running the libvirt snapshot tests as expected.
However, for those tests qemu-img binary needs to be installed.
Because these tests have been silently and incorrectly skipped for so long,
they didn't receive the same maintenance as other tests as the failures went unnoticed.
Change-Id: Ia90eedbe35f4ab2b200bdc90e0e35e5a86cc2110
Closes-bug: #2075178
Signed-off-by: Julien Le Jeune <julien.le-jeune@ovhcloud.com>
This change migrates the code currently written only to serve libvirt
driver to be generally useful, adding driver-neutral data structures
and a method to build them.
The libvirt driver is reworked to use get_instance_driver_metadata
instead of it's current code.
The ironic driver is reworked, per the blueprint, to send along some of
this additional metadata to the Ironic node.instance_info.
blueprint ironic-guest-metadata
Needed-By: https://review.opendev.org/c/openstack/ironic/+/924887
Change-Id: I2b23c8463f66c38e64625486157f245cd74cec61
This change modifes the nova-live-migration job to define
[compute]cpu_shared_set to different ranges on the controller
and compute node. in ci we have 8 cpus so the controller is set
to 0-5 and the compute uses 2-7
6 cores with our default allocation ratio should be sufficent
for our current level of concurrancy. This change also adds
the remaining cores as cpu_dedicated_set, they will currently
be unused but are thre if we want to enable pinned cpu testing
in the future.
Change-Id: I0d8463cf584d6ac141a5e1cb492d17996db458e0
This change updates the nova-next nodeset
to use openstack-two-node-noble and revert to
using qemu without nested virt.
using nested virt was a tempory messure to mitigate the kernel
panics we were seeing related to volume detach while we also explored
using split kernel images. since then we have reverted the other
jobs back to using normal whole disk images and we have not
seen a marked uptic in kernel panics.
as such this change drop the use of nested virt since the other jobs
are not using it an updates the nodeset to move nova-next to test on
ubuneu 24.04 (noble) on python 3.12
Depends-On: https://review.opendev.org/c/openstack/devstack/+/922427
Change-Id: I5059ba3c519efb18947a8f3d24868ce1c9289e3d
This file is being automatically generated during the docs build, no
need to have it persisted in git.
Change-Id: Ib45f722cc305e1d828d31724535e31ad3dda6c2e
pip 23.1 removed the "setup.py install" fallback for projects
that do not have pyproject.toml and now uses a pyproject.toml
which is vendored in pip.
To address that, this change adds the minimal pyproject.toml
to enable pbr to be properly used to build editable wheels.
This is required to support installing devstack on
centos stream 9 and related distros with GLOBAL_VENV=True
Without this change the wsgi scripts are not generated in
editable mode. i.e. pip install -e /opt/stack/keystone
See https://pip.pypa.io/en/stable/news/#v23-1
and https://github.com/pypa/pip/issues/8368 for more
details on the removal of the fallback support.
setuptools v64.0.0 is used to support editable installs
via its PEP-660 implmentation
https://github.com/pypa/setuptools/pull/3488
Depends-On: https://review.opendev.org/c/openstack/devstack/+/902758
Change-Id: I3255edb67fd7fe7a25b5871ec071c4b4c9d98ac2
This removes the in-tree format_inspector and makes us use the one in
oslo.utils. Minor changes are required around the behavior of the
safety_check() (raising instead of returning). This also allows images
detected as 'gpt' but registered as 'raw', since that's how everything
currently works. Hopefully later we can start registering in glance as
gpt, and rejecting boots from raw images.
Change-Id: I5b89e17438157690495961c306861a06532c8b4e
Depends-On: https://review.opendev.org/c/openstack/tempest/+/927146
This patch adds the following SPICE-related configuration option
to the 'spice' configuration group:
- require_secure
When set to true, libvirt will be provided with domain XML which
configures SPICE VDI consoles to require secure connections (that
is, connections protected by TLS). Attempts to connect without
TLS will receive an error indicating they should retry the connection
on the TLS port.
Change-Id: Ica7083b0836f8d66cad8a4b4097613103fc91560
This change implements the actual functionality to allow users to
launch instances with stateless firmware (read-only firmware image +
no NVRAM).
Note that this feature is supported by the libvirt virt driver, and
also requires libvirt >= 8.6.0.
Implements: blueprint libvirt-stateless-firmware
Change-Id: I7219bfa11ae98e65c326bec1a99c49d3e245cb9a
The method get_root_info sometimes receives a BlockDeviceMapping object,
which lacks a copy method. The previous code assumed root_bdm was always
an instance of DriverBlockDevice, a subclass of dict that supports the copy()
method. However, during testing, it was discovered that root_bdm could also
be a BlockDeviceMapping object, which does not have a copy method.
To address this, the change replaces the copy() call with copy.deepcopy()
according to the suggestion in the comment [1], which works for both
BlockDeviceMapping and DriverBlockDevice instances. The deepcopy method is
supported because oslo.versionedobjects implements the __deepcopy__ method.
This change ensures the function handles both object types correctly,
preventing the AttributeError observed during testing.
[1] https://review.opendev.org/c/openstack/nova/+/909611/4/nova/virt/libvirt/blockinfo.py
Change-Id: I9432718586855ff57e8e6a5cae064e0685dd01e8
Add the new image property to request stateless firmware. The property
will be used by the libvirt driver once the actual logic to enable
the feature is implemented.
Partially-Implements: blueprint libvirt-stateless-firmware
Change-Id: I05d4ff89d2b713b217b6c690e40fd4a16a397b63
This is the first step to support launching instances with stateless
firmware. At this stage none of the virt drivers report the trait to
support the feature.
Depends-on: https://review.opendev.org/c/openstack/os-traits/+/908885
Partially-Implements: blueprint libvirt-stateless-firmware
Change-Id: I4c1df950af11687ae5a52e4eba7943029ec36e69
In case nova fails to parse the XML from libvirt the lxml exception is
dumped to the log but it only states the location of the error in the
XML string like
lxml.etree.XMLSyntaxError: StartTag: invalid element name, line 40, column 35
To be able to troubleshoot the actual XML error we need to see the
invalid XML as well. So this patch makes sure that if nova fails to
parse the XML then the XML itself is dumped to DEBUG log.
Change-Id: I14cce6db4c86f663e61d3668d081858741e88add
While we do cache the hosts's capabilities in self._caps in the
libvirt Host object, if we happen to fist call get_capabilities() with
some of our dedicated CPUs offline, libvirt erroneously reports them
as being on socket 0 regardless of their real socket. We would then
cache that topology, thus breaking pretty much all of our NUMA
accounting.
To fix this, this patch makes sure to call get_capabilities()
immediately upon host init, and to power up all our dedicated CPUs
before doing so. That way, we cache their real socket ID.
For testing, because we don't really want to implement a libvirt bug
in our Python libvirt fixture, we make due with a simple unit tests
that asserts that init_host() has powered on the correct CPUs.
Closes-bug: 2077228
Change-Id: I9a2a7614313297f11a55d99fb94916d3583a9504