60419 Commits

Author SHA1 Message Date
Artom Lifshitz
4bcf5adada Power on cores for isolated emulator threads
Previously, with the `isolate` emulator threads policy and libvirt cpu
power management enabled, we did not power on the cores to which the
emulator threads were pin. Start doing that, and don't forget to power
them down when the instance is stopped.

Closes-bug: 2056612
Change-Id: I6e5383d8a0bf3f0ed8c870754cddae4e9163b4fd
(cherry picked from commit 0986d2bbe871d852075549eecea46f4b282c0842)
2024-03-14 10:51:19 -04:00
Artom Lifshitz
3dde97216c Reproducer for not powering on isolated emulator threads cores
Related-bug: 2056612
Change-Id: Icd586cdd015143b2e113fd14904f40410809d247
(cherry picked from commit 521af2620958fb1a466bfb1dbf2da566634eb992)
2024-03-14 10:51:11 -04:00
Artom Lifshitz
62a35d2324 Add cpuset_reserved helper to instance NUMA topology
When we pin emulator threads with the `isolate` policy, those pins are
stored in the `cpuset_reserved` field in each NUMACell. In subsequent
patches we'll need those pins for the whole instance, so this patch
adds a helper property that does this for us, similar to how the
`cpu_pinning` property helper currently works.

Related-bug: 2056612
Change-Id: I8597f13e8089106434018b94e9bbc2091f95fee9
(cherry picked from commit 8dbfecd66315cb2ac0b8c767e2a2a45e592589ed)
2024-03-14 10:51:01 -04:00
Steven Blatzheim
45a926156c Fix nova-metadata-api for ovn dhcp native networks
With the change from ml2/ovs DHCP agents towards OVN implementation
in neutron there is no port with device_owner network:dhcp anymore.
Instead DHCP is provided by network:distributed port.

Closes-Bug: 2055245
Change-Id: Ibb569b9db1475b8bbd8f8722d49228182cd47f85
(cherry picked from commit 135af5230e6f30fe158a25f7888e52cf886a7a35)
2024-03-01 13:35:18 +00:00
Zuul
a7944c1e49 Merge "libvirt: stop enabling hyperv feature reenlightenment" into stable/2023.2 2024-02-16 18:33:40 +00:00
songjie
436e525a97 libvirt: stop enabling hyperv feature reenlightenment
The 'reenlightenment' hyperv enlightenment will cause
instances live-migration to fail (KVM currently doesn’t
fully support reenlightenment notifications, see
www.qemu.org/docs/master/system/i386/hyperv.html),
so don't enable it now.

Change-Id: I6821819450bc96e4304125ea3b76a0e462e6e33f
Closes-Bug: #2046549
Related-Bug: #2009280
(cherry picked from commit e618e78edc6293d248a5fa2eb63b3fa636250fca)
2024-02-15 14:20:09 +00:00
Artom Lifshitz
0b7a59ad28 libvirt: Stop unconditionally enabling evmcs
In I008841988547573878c4e06e82f0fa55084e51b5 we started enabling a
bunch of libvirt enlightenments for Windows unconditionally. Turns
out, the `evmcs` enlightenment only works on Intel hosts, and we broke
the ability to run Windows guests on AMD machines. Until we become
smarter about conditionally enabling evmcs (with something like traits
for host CPU features), just stop enabling it at all.

Change-Id: I2ff4fdecd9dc69de283f0e52e07df1aeaf0a9048
Closes-bug: 2009280
(cherry picked from commit 86a35e97d286cbb6e23f8cc7bec5a05f022da0cb)
2024-02-15 11:12:09 +00:00
Zuul
5d51dfb16e Merge "cpu: make governors to be optional" into stable/2023.2 2024-02-01 13:02:09 +00:00
Zuul
009e3bb784 Merge "Revert "[pwmgmt]ignore missin governor when cpu_state used"" into stable/2023.2 2024-02-01 13:02:03 +00:00
Amit Uniyal
0a55ec33e6 Fixes: bfv vm reboot ends up in an error state.
we only need to verify if bdm has attachment id and it should be present in both nova and cinde DB.

For tests coverage, added tests for bfv server to test different bdm source type.

Changes: master to 2023.2
   added datetime import
   which was added in master by I789eeae86947e9a3cbd7d5fcc58d2aabe3b8b84c

Closes-Bug: 2048154
Closes-Bug: 2048184
Change-Id: Icffcbad27d99a800e3f285565c0b823f697e388c
(cherry picked from commit b5173b419219437b50f49c88bce9727ed0ed1ee8)
2024-01-19 09:16:11 +00:00
Amit Uniyal
19a4402fc2 Updates glance fixture for create image
glance client takes image_min_disk as string and return as int,
while glance fixture is returning as it is.

Change-Id: I47df4d147d9dd4c901af2c55c97e111e603cd806
(cherry picked from commit 12ca930e459ce2b5487f8d2f9854069ed9d95cf1)
2024-01-19 05:20:02 +00:00
Sylvain Bauza
891d1773a2 cpu: make governors to be optional
Change-Id: Ifb7d001cfdb95b1b0aa29f45c0ef71c0673e1760
Closes-Bug: #2023018
(cherry picked from commit 2c4421568ea62e66257b55c08092de3e0303fb0a)
2024-01-16 11:46:59 +01:00
Balazs Gibizer
25d0db782e Revert "[pwmgmt]ignore missin governor when cpu_state used"
This reverts commit 3c054dc6c5beaba5187a52d86ebdacb8e5f052d9 as it has a
bug in it expecting a wrong exception type (FileNotFoundError vs
nova.exception.FileNotFound). Also there is a proper fix on master
2c4421568ea62e66257b55c08092de3e0303fb0a that can be backported instead.

Change-Id: Id2c253a6e223bd5ba22512d9e5a40a9d12680da2
(cherry picked from commit 03ef4d6f53843bae9860e5f207453a5e741f3edc)
2024-01-16 11:46:12 +01:00
Zuul
a991471ed9 Merge "Fix URLs in status check results" into stable/2023.2 2024-01-15 19:07:47 +00:00
Bence Romsics
4239d1fec2 Do not untrack resources of a server being unshelved
This patch concerns the time when a VM is being unshelved and the
compute manager set the task_state to spawning, claimed resources of
the VM and then called driver.spawn(). So the instance is in vm_state
SHELVED_OFFLOADED, task_state spawning.

If at this point a new update_available_resource periodic job is
started that collects all the instances assigned to the node to
calculate resource usage. However the calculation assumed that a
VM in SHELVED_OFFLOADED state does not need resource allocation on
the node (probably being removed from the node as it is offloaded)
and deleted the resource claim.

Given all this we ended up with the VM spawned successfully but having
lost the resource claim on the node.

This patch changes what we do in vm_state SHELVED_OFFLOADED, task_state
spawning. We no longer delete the resource claim in this state and
keep tracking the resource in stats.

Change-Id: I8c9944810c09d501a6d3f60f095d9817b756872d
Closes-Bug: #2025480
(cherry picked from commit f1dc4ec39bcfda1bd4b97e233a9da498b6378c4f)
2023-12-27 09:46:42 +01:00
Bence Romsics
477ff2667d Reproduce bug #2025480 in a functional test
Written by gibi, I just cleaned it up.

Change-Id: I8386a846b3685b8d03c59334ccfb2efbd4afe427
Co-Authored-By: Balazs Gibizer <gibizer@gmail.com>
Related-Bug: #2025480
(cherry picked from commit 62300d4885549368f874b3e07b756017ff96c659)
2023-12-27 09:46:39 +01:00
Zuul
12c5de8f89 Merge "Fix traits to cpu flags mapping" into stable/2023.2 2023-12-19 15:24:32 +00:00
Sivasathurappan Radhakrishnan
989ee44890 Allow live migrate paused instance when post copy is enabled
Live migration of paused instance fails when VIR_MIGRATE_POSTCOPY
flag is set. In this patch, the flag is unset to permit live migration
of paused instance.

Change-Id: Ib5cbc948cb953e35a22bcbb859976f0afddcb662
Closes-Bug: #1671011
(cherry picked from commit 33fa92b6cb1dfeb88a4188c0e4e4ce51be1f7a4b)
2023-12-19 08:07:56 +00:00
Pierre Riteau
b81439e2a2 Remove outdated comment about allocation ratios
Setting allocation ratios via host aggregate metadata has not been
possible since Ocata.

Change-Id: Ia1a14a56739ec4c3f6930f1947a7423fd447fe34
(cherry picked from commit 88068781d494b263a875b44bcbb6dcd5a98671f3)
2023-12-14 16:55:47 +00:00
Ali Safari
55ed5765fa Fix traits to cpu flags mapping
Following keys like HW_CPU_X86_SVM and HW_CPU_X86_VMX are placed in TRAITS_CPU_MAPPING as part of a tuple instead of being direct keys.
This patch will flaten these tuples.
Closes-Bug: #2043030

Change-Id: Ia600ceb22c5939117095593b97ed94735c8f953c
(cherry picked from commit 99fe8c93a1cac2cb6fa59218ea9bf8687bf8d4df)
2023-12-12 05:26:53 +00:00
Balazs Gibizer
3c054dc6c5 [pwmgmt]ignore missin governor when cpu_state used
When cpu_state power management strategy is requested nova-compute
should not fail to start if there is no cpufreq governor is supported by
the host.

Closes-Bug: #2045966
Change-Id: Ice2fa47bdab320a7e472fbb4767761448d176bad
(cherry picked from commit ed2ac71a46b6caf620ddc08219ebae31f5af197d)
2023-12-09 17:27:40 +00:00
Zuul
3962a98f81 Merge "Allow enabling cpu_power_management with 0 dedicated CPUs" into stable/2023.2 28.0.1 2023-11-29 19:15:03 +00:00
Zuul
3f3386d0b4 Merge "Do not manage CPU0's state" into stable/2023.2 2023-11-27 21:28:23 +00:00
Zuul
5f09f86dc4 Merge "Translate VF network capabilities to port binding" into stable/2023.2 2023-11-27 20:07:50 +00:00
Balazs Gibizer
4549e34792 Allow enabling cpu_power_management with 0 dedicated CPUs
The CPU power management feature of the libvirt driver, enabled with
[libvirt]cpu_power_management, only manages dedicated CPUs and does not
touch share CPUs. Today nova-compute refuses to start if configured
with [libvirt]cpu_power_management=true [compute]cpu_dedicated_set=None.
While this is functionally not limiting it does limit the possibility to
independently enable the power management and define the
cpu_dedicated_set. E.g. there might be a need to enable the former in
the whole cloud in a single step, while not all nodes of the cloud will
have dedicated CPUs configured.

This patch removes the strict config check. The implementation already
handles each PCPU individually, so if there are an empty list of PCPUs
then it does nothing.

Closes-Bug: #2043707
Change-Id: Ib070e1042c0526f5875e34fa4f0d569590ec2514
(cherry picked from commit b1a0aee1abca0ed61c156dd99544adeaebaf0960)
2023-11-22 10:26:33 +01:00
Dan Smith
9cee58c6e4 Do not manage CPU0's state
If cpu_power_management_strategy is "cpu_state" and CPU0 is in the
dedicated set, we should just ignore it whenever we go to manage the
state. Since CPU0 cannot be powered off, but may be otherwise suitable
for the dedicated set, we can just skip it whenever we would normally
go to power it up or down.

Change-Id: I995c0953b361c7016bd77482fa2e2f276d239828
Fixes-Bug: #2038840
(cherry picked from commit 0b9d8cee580739e7a4e2a769e4d4e35110a6bc49)
2023-11-22 09:22:13 +00:00
Sylvain Bauza
6b870ab90a Fix rebuild compute RPC API exception for rolling-upgrades
By I0d889691de1af6875603a9f0f174590229e7be18 we broke rebuild for Yoga
or older computes.
By I9660d42937ad62d647afc6be965f166cc5631392 we broke rebuild for Zed
computes.

Fixing this by making the parameters optional.

Change-Id: I0ca04045f8ac742e2b50490cbe5efccaee45c5c0
Closed-Bug: #2040264
(cherry picked from commit ee9ed0f7c6abf7c4847e6dc31f6d3d79b25b9d99)
2023-11-13 19:39:32 +01:00
Sylvain Bauza
eb310f3bd2 add a regression test for all compute RPCAPI 6.x pinnings for rebuild
We forgot that we automatically pin our RPC calls to the RPC version
that the older compute supports, so when rolling-upgrading computes, we
continue to use either Yoga or Zed versions for example when upgrading
to 2023.1.

Since the new parameters aren't optional, we broke the
rebuild_instance() method then for Yoga to Zed and Zed to 2023.1.

Change-Id: Icf340f3d4c5ce0a4b7388003f168e7c479e58eee
Related-Bug: #2040264
(cherry picked from commit 21fd0c430c714d21c52e0a0c996351c374a3e3d6)
2023-11-07 16:23:28 +00:00
Alexey Stupnikov
7e4f45df91 Translate VF network capabilities to port binding
Libvirt's node device driver accumulates and reports information
about host devices. Network capabilities reported by node device
driver for NIC contain information about HW offloads supported
by this NIC.

One of possible features reported by node device driver is
switchdev: a NIC capability to implement VFs similar to actual
HW switch ports (also referred to as SR-IOV OVS hardware offload).
From Neutron perspective, vnic-type should be set to "direct" and
"switchdev" capability should be added to port binding profile to
enable HW offload (there are also configuration steps on compute
hosts to tune NIC config).

This patch was written to automatically translate "switchdev" from
VF network capabilities reported by node device driver to Neutron
port binding profile and allow user to skip manual step that
requires admin privileges.

Other capabilities are also translated: they are not used right
now, but provide visibility and can be utilized later.

Closes-bug: #2020813
Closes-bug: #2008238
Change-Id: I3b17f386325b8f42c0c374f766fb21c520161a59
(cherry picked from commit cef3b5ef2cc1fe983578e4966208cf95fdea5880)
2023-10-25 06:05:58 +00:00
Dan Smith
a5e26bf6ca Revert "Add upgrade check for compute-object-ids linkage"
This is being reverted because it's overly strict and complaining
that upgrade-related work has not been done before it should have or
needs to have been done. This may be re-added later when we start
depending on these linkages.

Closes-Bug: #2039597
This reverts commit 27f384b7ac4f19ffaf884d77484814a220b2d51d.

Change-Id: Ifa5b82ca3b83d0ba481aa7a062827bd8e838989a
(cherry picked from commit e1b84a398766bdbccf2d834364fc9e9a7547bb4a)
2023-10-24 07:10:31 +00:00
Dan Smith
6d5943e1b5 Install lxml before we need it in post-run
Change-Id: Ibf6bfde6c524821fa5dc3c01b2eb57635e587de6
Closes-Bug: #2039463
(cherry picked from commit bfdc99ffbbe4f67f6e2f04025a5634dd9b11dee0)
2023-10-24 07:10:20 +00:00
Dr. Jens Harbott
fb59ca63ec Fix URLs in status check results
The URLs had the wrong order of "/latest/nova" instead of the correct
one, leading to "404 not found" errors.

Closes-Bug: 2036530

Change-Id: I083381ad2649c06be9443f5ed6a55bddafab4df8
(cherry picked from commit 32dc852b56a3bfd778595271d2f63c74481631d0)
2023-10-05 02:36:41 +00:00
7eeeb9d19d [stable-only] Update TOX_CONSTRAINTS_FILE for stable/2023.2
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/2023.2 branch, tests
will continue to use the upper-constraints list on master.

Change-Id: Idf5d8408ac2586be7a4cfd38fa83e39cfe08b87d
2023-09-23 21:06:22 +02:00
6ac11b42b5 [stable-only] Update .gitreview for stable/2023.2
Change-Id: Ia99632d75c40bb91c1e3ab3b6918ce0db3428398
2023-09-23 21:05:41 +02:00
Zuul
1f60a71e0a Merge "Add a Bobcat prelude section" 28.0.0.0rc1 28.0.0 2023-09-19 13:50:23 +00:00
Sylvain Bauza
10ea7a4fb2 Add a Bobcat prelude section
Shamelessly copied from the cycle highlights.

Change-Id: I79b501e61b91fc0e003bfe352975c6500917f7e7
2023-09-19 11:32:43 +02:00
Zuul
022b1bf2a6 Merge "Revert "Limit nodes by ironic shard key"" 2023-09-18 19:07:55 +00:00
Zuul
270e63e20a Merge "Revert "Add nova-manage ironic-compute-node-move"" 2023-09-18 13:41:30 +00:00
Zuul
3e8b2f37a7 Merge "Make our nova-ovs-hybrid-plug job omit cinder" 2023-09-16 21:27:13 +00:00
Zuul
b4e6daf6fa Merge "Add service version for Bobcat" 2023-09-14 08:24:43 +00:00
Zuul
4b0515514d Merge "Revert "Make compute node rebalance safter"" 2023-09-13 21:32:20 +00:00
Zuul
12d252a264 Merge "Update compute rpc alias for bobcat" 2023-09-13 20:08:44 +00:00
Amit Uniyal
c486cc89dc Make our nova-ovs-hybrid-plug job omit cinder
modifies nova-ovs-hybrid-plug job to disable cinder and swift to
ensure we test for this going forward.

Change-Id: I52046e6f7acdfb20eeba67dda59cbb5169e5d17e
2023-09-13 12:23:43 -07:00
Sylvain Bauza
9a27434ffc Revert "Limit nodes by ironic shard key"
This reverts commit f5a12f511b26858131ee79ae5bce38e3f60b156d.

Change-Id: I4a329237231ba741b57b2ef6437fcee226915d40
2023-09-13 19:24:48 +02:00
Sylvain Bauza
3491b945b9 Revert "Add nova-manage ironic-compute-node-move"
This reverts commit 9068db09e4d659e61dfeca44114fcb763cda5a07.

Change-Id: Ibf9a426a90c73bfc921f807e617a25647fc49400
2023-09-13 19:24:36 +02:00
Sylvain Bauza
36a5740e2a Revert "Make compute node rebalance safter"
This reverts commit 772f5a1ae4fa9f9a584f42f774894d540b4b168f.

Change-Id: I20e78dfafe19fc1e7dc7344238c01cb585f744dc
2023-09-13 19:24:20 +02:00
Zuul
53012f1c55 Merge "adapt to oslo.log changes" 2023-09-11 16:42:25 +00:00
Zuul
96ae9708e6 Merge "doc: mark the maximum microversion for 2023.2 Bobcat" 2023-09-11 15:48:39 +00:00
Sean Mooney
ea07f96eb1 adapt to oslo.log changes
This change refactors prvisep util test cases to account for the
fact that oslo.log now conditionally uses an internal pipe mutex
when logging under eventlet.

This was added by Iac1b0891ae584ce4b95964e6cdc0ff2483a4e57d
which is part of oslo.log 5.3.0

As a result we need to mock all calls to oslo.log in unit tests
that are assertign if os.write is called. when the internal
pipe mutex is used oslo.log calls os.write when the mutex is
released.

Related-Bug: #1983863
Change-Id: Id313669df80f9190b79690fff25f8e3fce2a4aca
2023-09-11 16:15:32 +01:00
Sylvain Bauza
a3e0910d88 Add service version for Bobcat
We agreed last cycle on the support envelope.
Pre-RC1, we need to add a service version in the object.
Post-RC1, depending on whether it's SLURP or not SLURP, we need to bump
the minimum version or not.

This patch only focuses on pre-RC1 stage.
Given Caracal is SLURP, we won't need any post-RC1 patch for updating the min
that will stay to be Antelope.

HTH.

Change-Id: I50deead4bbd1e383c9e4ca472a3d2724b78ee104
2023-09-05 16:38:27 +02:00