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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
Setting allocation ratios via host aggregate metadata has not been
possible since Ocata.
Change-Id: Ia1a14a56739ec4c3f6930f1947a7423fd447fe34
(cherry picked from commit 88068781d494b263a875b44bcbb6dcd5a98671f3)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
modifies nova-ovs-hybrid-plug job to disable cinder and swift to
ensure we test for this going forward.
Change-Id: I52046e6f7acdfb20eeba67dda59cbb5169e5d17e
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
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