Commit Graph

60743 Commits

Author SHA1 Message Date
Zuul 326a41b3b3 Merge "Catch ImageNotFound on snapshot failure" 2024-02-26 20:59:58 +00:00
Zuul 065f6e1b51 Merge "trivial doc fix" 2024-02-26 08:33:29 +00:00
Rajesh Tailor 0d1a2cab78 trivial doc fix
In cells-v2 doc, the templated URLs example for
config-option `transport_url` uses : instead of @.

This change corrects the example for the same.

Change-Id: I521a9e648404825a798f568f8a88cf17af8880f3
2024-02-26 13:27:53 +05:30
John Garbutt 947bb5f641 Make compute node rebalance safer
Many bugs around nova-compute rebalancing are focused around
problems when the compute node and placement resources are
deleted, and sometimes they never get re-created.

To limit this class of bugs, we add a check to ensure a compute
node is only ever deleted when it is known to have been deleted
in Ironic.

There is a risk this might leave orphaned compute nodes and
resource providers that need manual clean up because users
do not want to delete the node in Ironic, but are removing it
from nova management. But on balance, it seems safer to leave
these cases up to the operator to resolve manually, and collect
feedback on how to better help those users.

blueprint ironic-shards

Change-Id: I2bc77cbb77c2dd5584368563dc4250d71913906b
2024-02-25 13:25:27 -08:00
John Garbutt 08d7be1726 Add nova-manage ironic-compute-node-move
When people transition from three ironic nova-compute processes down
to one process, we need a way to move the ironic nodes, and any
associcated instances, between nova-compute processes.

For saftey, a nova-compute process must first be forced_down via
the API, similar to when using evacaute, before moving the associated
ironic nodes to another nova-compute process. The destination
nova-compute process should ideally not be running, but not forced
down.

blueprint ironic-shards

Change-Id: I33034ec77b033752797bd679c6e61cef5af0a18f
2024-02-25 13:25:27 -08:00
John Garbutt f1a4857d61 Limit nodes by ironic shard key
Ironic in API 1.82 added the option for nodes to be associated with
a specific shard key. This can be used to partition up the nodes within
a single ironic conductor group into smaller sets of nodes that can
each be managed by their own nova-compute ironic service.

We add a new [ironic]shard config option to allow operators to say
which shard each nova-compute process should target.
As such, when the shard is set we ignore the peer_list setting
and always have a hash ring of one.

Also corrects an issue where [ironic]/conductor_group was considered
a mutable configuration; it is not mutable, nor is shards. In any
situation where an operator changes the scope of nodes managed by a
nova compute process, a restart is required.

blueprint ironic-shards
Co-Authored-By: Jay Faulkner <jay@jvf.cc>

Change-Id: Ie0c71f7bc5a62d607ffd3134837299fee952a947
2024-02-25 13:25:27 -08:00
Zuul 9a9ab2128b Merge "Reserve mdevs to return to the source" 2024-02-23 15:46:08 +00:00
Zuul bdd7daffbb Merge "Check if destination can support the src mdev types" 2024-02-23 15:46:01 +00:00
Zuul f15b8b7204 Merge "check both source and dest compute libvirt versions for mdev lv" 2024-02-23 15:40:00 +00:00
Zuul fa7233d8f9 Merge "Follow up patch to correct a minor documentation issue" 2024-02-23 13:26:18 +00:00
Sean Mooney 2dff0f1c76 [S-RBAC] adapt nova-next for port's binding:profile field change
The binding:profile now requires the service user token
to be sent when modifying the binding:profile
see I5c0094ff21439fe8977cfc623789a09067e6a895

This is not currently supported intentionally by the openstack
client as humans and users of the openstack client should not
be making requests with a service token.

the nova next post hook had some addtioanl assertions where we injected
a fake key in the binding:profile just to assert it was not
deleted. This cant work anymore so it has been removed.

Related-Bug: #2052937
Change-Id: I5c155f0613107ccee63b502ae1fed7a865e67829
2024-02-22 19:39:39 +00:00
Dan Smith 40a56ce05b Catch ImageNotFound on snapshot failure
Right now we're logging this as an unexpected failure, complete with
full traceback. However, this is expected if an image is deleted
mid-snapshot, as is the case in one of our tempest tests.

Change-Id: I6eb76c0500c7940778b7a15ac5202659ef92a82a
2024-02-22 11:21:49 -08:00
Zuul 3209f65516 Merge "HyperV: Remove RDP console API" 2024-02-20 07:01:10 +00:00
Sean Mooney e123055530 bump nova-lvm to use 8G of swap from 4G
nova-lvm ocationally has OOM events causing
g-api to get killed. This can result in test failures
with a 502 form glance so we bump the swap to 8G
like the ceph jobs to avoid that.

Change-Id: Ib88f9feb692ee440b8f73e9b3dca56c08dadb665
2024-02-19 16:54:04 +00:00
Zuul 6e510eb62e Merge "HyperV: Remove RDP console connection information API" 2024-02-19 09:28:20 +00:00
Zuul a125b6514d Merge "Drop unnecessary mocking of get_minimum_version_all_cells" 2024-02-16 18:33:55 +00:00
Zuul 1644557db3 Merge "docs: Further tweaks to the CPU models document" 2024-02-16 18:33:10 +00:00
Takashi Kajinami 0dd6b1d9fa Drop unnecessary mocking of get_minimum_version_all_cells
Service version 14 is too old. The actual logic for that version was
already removed.

Change-Id: Ifa2430c2ed983c61bb7232b009d471b45e7a74ec
2024-02-17 00:20:16 +09:00
Sylvain Bauza 2e1e12cd62 Reserve mdevs to return to the source
The destination lookups at the src mdev types and returns its own
mdevs using the same type. We also reserve them by an internal dict
and we make sure we can cleanup this dict if the live-migration aborts.

Partially-Implements: blueprint libvirt-mdev-live-migrate
Change-Id: I4a7e5292dd3df63943bd9f01803fa933e0466014
2024-02-16 16:05:48 +01:00
Zuul 84a3e254e8 Merge "libvirt: stop enabling hyperv feature reenlightenment" 2024-02-15 13:21:27 +00:00
Zuul f315c5658e Merge "libvirt: Stop unconditionally enabling evmcs" 2024-02-15 10:22:41 +00:00
Amit Uniyal 77851bb365 Separate OSError with ValueError
OSError will only be raised, if file path is not readable because of permission issue.
With this change we will get correct error msg.

Change-Id: Iad3b0f2ab3e6eafd9f6c98477edfa35c4cd46ee8
2024-02-15 08:46:22 +00:00
Amit Uniyal 211737d0ce Added context manager for instance lock
Moved lock and unlock instance code to context manager.
Updated _refresh volume attachment method to use instance
lock context manager

Now there will be a single request ID for the lock, refresh, and unlock
actions. Earlier, the volume_attachment refresh operation used to have a
unique req-id for each action.

Related-Bug: #2012365
Change-Id: I6588836c3484a26d67a5995710761f0f6b6a4c18
2024-02-15 05:32:39 +00:00
melanie witt eb4e0faf2d block_device: Add encryption attributes to swap disks
This enables use of ephemeral encryption for swap disks.

The 'encrypted' attribute is intended to be read-only, so we will raise
an error if something attempts to save it later.

DriverImageBlockDevice and DriverEphemeralBlockDevice are already not
saving updates to their 'encrypted' attributes, so the same error
checking is added to them as well for consistency.

Related to blueprint ephemeral-encryption-libvirt

Change-Id: Id30577699928180eff6a5b78390ce9e3efa28b16
2024-02-14 08:03:34 +00:00
Ghanshyam Mann 3b4db6408e HyperV: Remove extra specs of HyperV driver
There are a few extra spec which are only applicable for HyperV driver,
therefore those are removed.

Change-Id: I9bd959fdf9938b2752c4927c5ff7daf89b5f0d38
2024-02-13 20:25:22 +00:00
Ghanshyam Mann 0c1e1ccf03 HyperV: Remove RDP console API
RDP console was only for HyperV driver so removing the
API. As API url stay same (because same used for other
console types API), RDP console API will return 400.

Cleaning up the related config options as well as moving its
API ref to obsolete seciton.

Keeping RPC method to avoid error when old controller is used
with new compute. It can be removed in next RPC version bump.

Change-Id: I8f5755009da4af0d12bda096d7a8e85fd41e1a8c
2024-02-13 12:24:38 -08:00
Ghanshyam Mann 3e47439a68 HyperV: Remove RDP console connection information API
The RDP console was only available for HyperV driver, therefore its
connection information via API ``os-console-auth-tokens`` will now return
HTTP ``400 (BadRequest)`` error.

Starting from 2.31 microversion, this API return connection info
for all other console type.

Change-Id: I94e590eb4cbe3b2d8eff7fe881f7b98af8979be2
2024-02-13 19:28:07 +00:00
Ghanshyam Mann 260dbd9761 HyperV: Add todo to remove HyperVLiveMigrateData object
With HyperV driver going away, HyperVLiveMigrateData
is not needed but we will keep it for a couple of cycle.
Adding note about removing it in later releases.

Change-Id: I3574488faffb5a6f5993097496be4de146d61d5c
2024-02-13 11:27:44 -08:00
Zuul e11f08673e Merge "Remove HyperV: cleanup doc/code ref" 2024-02-13 17:38:29 +00:00
Zuul 8c5bed134e Merge "Augment the LibvirtLiveMigrateData object" 2024-02-13 15:14:39 +00:00
René Ribaud e497366f0e Follow up patch to correct a minor documentation issue
Manila is the OpenStack Shared Filesystems service.
These series of patches implement changes required in Nova to allow the shares
provided by Manila to be associated with and attached to instances using
virtiofs.

Implements: blueprint libvirt-virtiofs-attach-manila-shares
Change-Id: I9d94a80d5e86d0494f59e02949d2cc45f8055e84
2024-02-09 11:37:23 +01:00
Zuul 35af4b345d Merge "Remove the Hyper-V driver" 2024-02-08 16:14:23 +00:00
Ghanshyam Mann c76c72cfe0 Remove HyperV: cleanup doc/code ref
Cleanup doc/code ref of HyperV driver.

Change-Id: I6cd8fb90829e040bfd356ff6b1c41aa9a1c906d2
2024-02-07 12:08:07 -08:00
melanie witt 6827b763b4 run-evacuate-hook: Check cinder before creating BFV server
Awhile back change I52046e6f7acdfb20eeba67dda59cbb5169e5d17e disabled
cinder in the nova-ovs-hybrid-plug job and added checks for cinder
before attempting to run evacuate BFV tests.

Resource setup for BFV was however not bypassed and the attempt to
setup a BFV server resource fails with:

  keystoneauth1.exceptions.catalog.EndpointNotFound: publicURL endpoint
  for volumev3 service not found

This adds a bypass to avoid attempting to create a BFV server when
cinder is not available.

Change-Id: I52c7e5ce268bb38cee16c18c5523fe0e224970aa
2024-02-06 17:52:30 +00:00
OpenStack Release Bot 0c793f84a8 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: Ibeb1e834dd39cf705360dc228b92560ea74ab71d
2024-02-06 14:27:07 +00:00
Pierre-Samuel Le Stang aa3e8fef7b Correctly reset instance task state in rebooting hard
When a user ask for a reboot hard of a running instance while nova compute is
unavailable (service stopped or host down) it might happens under certain
conditions that the instance stays in rebooting_hard task_state after
nova-compute start again. This patch aims to fix that.

Closes-Bug: #1999674
Change-Id: I170e390fe4e467898a8dc7df6a446f62941d49ff
2024-02-06 10:04:01 +01:00
Ghanshyam Mann b068b04372 Remove the Hyper-V driver
Nova Hyper-V driver is not tested in OpenStack upstream and no maintianers.
This driver has been marked as deprecated in Antelope release. It has dependency
on the OpenStack Winstacker project which has been retired[1].

As discussed in vPTG[2], removing the HyperV driver, tests, and its config.

[1] https://review.opendev.org/c/openstack/governance/+/886880
[2] https://etherpad.opendev.org/p/nova-caracal-ptg#L301

Change-Id: I568c79bae9b9736a20c367096d748c730ed59f0e
2024-02-05 12:06:58 -08:00
Sylvain Bauza 489aab934c Check if destination can support the src mdev types
Now that the source knows that both the computes support the right
libvirt version, it passes to the destination the list of mdevs it has
for the instance. By this change, we'll verify if the types of those
mdevs are actually supported by the destination.
On the next change, we'll pass the destination mdevs back to the
source.

Partially-Implements: blueprint libvirt-mdev-live-migrate
Change-Id: Icb52fa5eb0adc0aa6106a90d87149456b39e79c2
2024-02-05 15:10:55 +01:00
Zuul 681f6872fb Merge "testing: Use inspect.isfunction() to check signatures" 2024-02-02 06:51:34 +00:00
Zuul da918d4b95 Merge "Revert "[pwmgmt]ignore missin governor when cpu_state used"" 2024-01-31 16:37:02 +00:00
Sylvain Bauza baa78326dd check both source and dest compute libvirt versions for mdev lv
Since only qemu 8.1 and libvirt 8.6.0 supports mdev live-migration,
we need to verify the values of the hypervisor for both the source
and the destination.

If one of them are older, the conductor raises an exception that will
eventually fact the API to return an HTTP500.

Change-Id: I17f170143c58401b8b0a5a93e83355b1f7178ab5
Partially-Implements: blueprint libvirt-mdev-live-migrate
2024-01-30 20:45:13 +01:00
Sylvain Bauza fbdd68d4de Augment the LibvirtLiveMigrateData object
Adds the fields to the object so we can use them for passing the values
of the mediated devices betwen the target and the source.

Change-Id: I70d69c2b9c58f34db7e0d57c438db337d52a9a75
Partially-Implements: blueprint libvirt-mdev-live-migrate
2024-01-30 20:45:08 +01:00
Arnaud Morin 5da11e4231 Fix tipo
Change-Id: I414e8a88f878b8eff34d7a1bf23d855d3ed4c101
Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
2024-01-30 15:14:36 +01:00
Zuul a66a0dd113 Merge "Attach Manila shares via virtiofs (objects)" 2024-01-29 15:43:17 +00:00
Simon Hensel 406d590a36 Always delete NVRAM files when deleting instances
When deleting an instance, always send VIR_DOMAIN_UNDEFINE_NVRAM to
delete the NVRAM file, regardless of whether the image is of type UEFI.
This prevents a bug when rebuilding an instance from an UEFI image to a
non-UEFI image.

Closes-Bug: #1997352

Change-Id: I24648f5b7895bf5d093f222b6c6e364becbb531f
Signed-off-by: Simon Hensel <simon.hensel@inovex.de>
2024-01-23 16:16:17 +01:00
Zuul 6531ed6310 Merge "doc: drop blockdiag usage" 2024-01-23 11:53:54 +00:00
Sylvain Bauza cc25813b6d doc: drop blockdiag usage
Since blockdiag seems a bit unmaintenained, let's just statically
generate the SVGs but let's keep the source files in tree so we can
modify the diagrams whenever we want, provided blockdiag exists in
a foreseenable future :-)

Closes-Bug: #2026345

Change-Id: I1cc078554ab149a9849c895e08c878180b7510b0
2024-01-22 18:27:04 +01:00
René Ribaud 0680f68682 Attach Manila shares via virtiofs (objects)
This patch introduce the ShareMapping and ShareMappingList top level objects
and associated attach and detach methods that interact with the DB
It also introduce ShareMappingLibvirt and ShareMappingLibvirtNFS
children objects that will be used by the driver part.

Manila is the OpenStack Shared Filesystems service.
These series of patches implement changes required in Nova to allow the shares
provided by Manila to be associated with and attached to instances using
virtiofs.

Implements: blueprint libvirt-virtiofs-attach-manila-shares

Change-Id: Ibacfeaf7daa726bf0ee7802bacd3f70329fec624
2024-01-22 18:10:22 +01:00
Zuul 087c372a8e Merge "[ironic] Partition & use cache for list_instance*" 2024-01-19 14:48:41 +00:00
Zuul a8cdffefb6 Merge "Attach Manila shares via virtiofs (db)" 2024-01-18 21:51:57 +00:00