Make sure that the 'mapped' field of compute nodes is reset
to 0 at nova-compute service deletion.
To let nova-manage create the missing host mapping in nova_api
database.
Closes-Bug: #2085135
Change-Id: I774d4312d7e94af94d960f7269717a00fa08c583
Signed-off-by: Julien Le Jeune <julien.le-jeune@ovhcloud.com>
The weigher is unable to get the right image metadata for existing
instances if they are not already on the HostState.
Change-Id: I5bccf854662ecffe1d469bacc6e4afcb746d6b4d
Signed-off-by: Sylvain Bauza <sbauza@redhat.com>
We have a centralized nova.utils.cooperative_yield() instead of
time.sleep(0). It is better as it allows to turn off the sleep calls
when the service runs in threaded mode.
Change-Id: I625daec79ee5b7f8b92116f450e21f997cef0546
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
This reproduces the bug where an attempt to revert a resize from a
flavor with vTPM to a different flavor with vTPM results in the revert
failing and the instance going into ERROR state when storage is not
shared.
Because of the lack of test coverage of vTPM with non-shared storage,
this change also just adds a subclass to run all of the vTPM functional
tests with the test environment mocked to behave as though storage is
not shared between compute hosts.
A bug fix will follow these functional tests.
Related-Bug: #2125030
Change-Id: I49745a8ba78e1ea6a1b009bccab32a002cb6afb0
Signed-off-by: melanie witt <melwittt@gmail.com>
Previous patches removed direct eventlet usage from nova-conductor so
now we can run it with native threading as well. This patch documents
the possibility and switches both nova-conductor process to native
threading mode in the nova-next job.
Change-Id: If26c0c7199cbda157f24b99a419697ecb6618fa6
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
Replace the remaining time.sleep calls use to trigger eventlet yield
to the existing nova.utils.cooperative_yield() call. This will help
us to disable such yielding in when the service is running in threading
mode and eventually drop the whole thing when nova removes eventlet.
Change-Id: I6b3fcba13f4d1c41d1fac2efe3cb4a943e66f8bb
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
There is two intermittently failing tests we need to ignore for now so
this patch extends the list.
Closes-Bug: #2125185
Change-Id: I8d440013c84ae1dac4e2a1f661fc31138944b032
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
Creating a new admin context as we can't reuse the RequestSpec user
context in order to hydrate InstanceList with the full list of instances
from the host and not only the ones from the user.
Closes-Bug: #2125052
Change-Id: Ibbd80324c17be6546ecd8b80f908ac5bbab5abd0
Signed-off-by: Sylvain Bauza <sbauza@redhat.com>
Added a functional regression test that shows that a second instance
fails on a host.
Related-Bug: #2125052
Change-Id: I14c1464d638a8c0d55e6a69ec22e0b83567c1797
Signed-off-by: Sylvain Bauza <sbauza@redhat.com>
This is a pure refactor so not having any unit test change actually
signals that the refactor did not change the existing behavior which is
good.
The unit test run on this patch only covers the eventlet mode but higher
in the series we run unit test with native threading mode in a separate
job that will complement the coverage for this patch.
Change-Id: Iafc96c93a0d4c406b77902942b2940653441fe38
Signed-off-by: Kamil Sambor <kamil.sambor@gmail.com>
This change fixes string format specifier from $ to % for
correct formatting.
Closes-Bug: #2123840
Signed-off-by: Rajesh Tailor <ratailor@redhat.com>
Change-Id: I04f6e1ba3eff443d40a13c6fe2d0b77a78a020e6
Add file to the reno documentation build to show release notes for
stable/2025.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2025.2.
Sem-Ver: feature
Change-Id: I7d967c1d5b1ac7fa2e601acfa25c3b5c3880056e
Signed-off-by: OpenStack Release Bot <infra-root@openstack.org>
Generated-By: openstack/project-config:roles/copy-release-tools-scripts/files/release-tools/add_release_note_page.sh
This is a major timesaver for repos the size of nova. This broke
recently due to changes in flake8 itself. This removes some
needless complexity to make it work again. It also removes the
suggestion to use pre-commit which has nothing to do with this
target, which also stings more when pre-commit is breaking things
which is why you're using this in the first place.
Change-Id: Ieb150bf0931ad8031ca83bae1f206075a9f505e2
Signed-off-by: Dan Smith <dansmith@redhat.com>
The /os-hypervisors/detail API endpoint was experiencing significant
performance issues in environments with many compute nodes when using
microversion 2.88 or higher, as it made sequential RPC calls to gather
uptime information from each compute node.
This change optimizes uptime retrieval by:
* Adding uptime to periodic resource updates sent by nova-compute to the
database, eliminating synchronous RPC calls during API requests
* Restricting RPC-based uptime retrieval to hypervisor types that support
it (libvirt and z/VM), avoiding unnecessary calls that would always fail
* Preferring cached database uptime data over RPC calls when available
Closes-Bug: #2122036
Assisted-By: Claude <noreply@anthropic.com>
Change-Id: I5723320f578192f7e0beead7d5df5d7e47d54d2b
Co-Authored-By: Sylvain Bauza <sbauza@redhat.com>
Signed-off-by: Sean Mooney <work@seanmooney.info>