Commit Graph

550 Commits

Author SHA1 Message Date
Balazs Gibizer 5cbe39aca9 Allow services to start with threading
At the service startup nova need to initialize either the eventlet or
the threading backend of oslo.service. So this patch reuses the existing
logic behind OS_NOVA_DISABLE_EVENTLET_PATCHING.

When OS_NOVA_DISABLE_EVENTLET_PATCHING env variable is set to true the
service will select the threading backend otherwise the eventlet
backend.

Also to avoid later monkey patch calls to invalidated the selection if
the threading backend is selected then the monkey_patch code is
poisoned.

This patch also makes sure that oslo.messaging also initialized with the
matching executor backend.

As this is the last step to make nova-scheduler run in threading mode
this patch adds a release notes as well.

Change-Id: I6e2e6a43df78d23580b5e7402352a5036100ab36
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
2025-08-12 07:51:01 -07:00
Zuul 735aae205c Merge "Revert^2 "Support glance's new location API"" 2025-08-07 10:35:14 +00:00
Michael Still 183896a79b libvirt: Add objects and notifications for sound model.
This patch adds just the objects and notifications required to
support an extra spec to configure a sound device inside
the guest. This is useful for SPICE consoles using the native
protocol.

Change-Id: I2faeda0fd0fb9c8894d69558a1ccaab8da9f6a1b
Signed-off-by: Michael Still <mikal@stillhq.com>
2025-07-07 14:44:57 +10:00
Abhishek Kekane 4e6070085f Revert^2 "Support glance's new location API"
This reverts commit 221a3e89e8.

Reason for revert: Glance side issue fixed with below change
Depends-On: https://review.opendev.org/c/openstack/glance/+/950853

Change-Id: Ia84d5d8b53742492e7e271765feff27215fa39bc
2025-06-17 16:29:36 +00:00
Dan Smith 221a3e89e8 Revert "Support glance's new location API"
Due to glance behavioral changes, using the new location API causes
async hashing jobs to create confusion for tooling not expecting
undeletable images.

Revert this until glance can resolve the issue.

This reverts commit eab0de2900.

Change-Id: Ifc4631720a1872cb6d93e9ee490c19edd1a7b98e
2025-05-19 08:58:58 -07:00
Dan Smith eab0de2900 Support glance's new location API
This makes us use the new method if available, and if not, fall back
to the old method.

Change-Id: If52ac05a02b69476bd2cfa74a7ee800c3f6eeb20
2025-04-21 07:09:58 -07:00
Dan Smith 28a266461a Support "one-time-use" PCI devices
This adds support for devices that will be allocated to an instance
once and left in a reserved=total state. An external workflow can
put them back into allocatable state by dropping reserved back to
zero. Note this requires PCI-in-placement tracking for the affected
devices and it is only valid for type-PCI and type-PF devices.

Related to blueprint one-time-use-devices

Depends-On: https://review.opendev.org/c/openstack/requirements/+/946181
Co-Authored-By: Balazs Gibizer <gibi@redhat.com>
Change-Id: Idfe8a746a97d68cd4eae30afb7d22f4e3af80327
2025-04-02 11:53:36 -07:00
Zuul f71a0a6204 Merge "Fix serial console for ironic" 2025-03-12 12:26:06 +00:00
Vasyl Saienko bf8883ca3b Fix serial console for ironic
Allign code after we switched to openstacksdk in ironic virt driver
related to serial console.

Closes-Bug: #2099872

Depends-On: https://review.opendev.org/c/openstack/requirements/+/942889

Change-Id: Ic25c5e8b9ac9cf87f4f96c9956140aa4f6576ded
2025-03-05 05:07:55 +00:00
Zuul e6b8b051a9 Merge "libvirt: Add new option to enforce multipath volume connections" 2025-03-01 14:09:09 +00:00
Zuul ef1585f9d7 Merge "Switch to using oslo.utils secretutils" 2025-02-28 01:42:53 +00:00
Takashi Kajinami 4aab14a09f libvirt: Add new option to enforce multipath volume connections
Currently, even when [libvirt] volume_use_multipath is set to True,
volume attachment silently falls back to single path if multipathd is
not running in the host. This sometimes prevents operators from
noticing the misconfiguration, until they face any issue caused by
missing redundancy.

Introduce the new [libvirt] volume_enforce_multipath option, which
makes the attachment process fail if multipathd is not running.
A similar parameter (enforce_multipath_for_image_xfer) was already
implemented in cinder and this change follows how the parameter is
implemented there.

Also add the check in init phase to detect lack of mulitipath daemon
during initializing driver.

Min version of os-brick has to be bumped due to the interface change
made by 8d919696a9f1b1361f00aac7032647b5e1656082 .

Implements: blueprint enforce-multipath
Change-Id: I828de70ca7b343a4562ace4049d2b3857dbf900a
2025-02-28 08:52:25 +09:00
Zuul 2a5fac7c61 Merge "Drop dependency on netifaces" 2025-02-17 20:07:30 +00:00
Takashi Kajinami 46435daf5c Drop dependency on netifaces
The netifaces library was abandoned and retired. Replace it by psutil
which is already part of the dependencies.

Note that localhost_supports_ipv6 from openstacksdk should be mocked
now because it uses psutil in recent versions.

Closes-Bug: #2071596
Change-Id: If9268cab8c2b3098d757571c6cab07d13d34a2c2
2025-02-14 19:46:32 +09:00
René Ribaud c161914a4a Bump os-traits to 3.3.0 in requirements
Change-Id: Icf4aef5175c745b1d6feda309338e86277d79549
2025-02-07 15:56:20 +01:00
James Page 9851a80ed3 Switch to using oslo.utils secretutils
As the crypt module has been dropped in Python 3.13 switch to
using the oslo.utils crypt_password replacement instead.

Change-Id: Ib8c11db025cd12a9fa86e9185bf9ad172a86ef6d
2025-01-21 11:11:08 +00:00
Zuul fe245e071b Merge "Replace distutils" 2024-11-30 02:44:50 +00:00
Zuul a96c62f200 Merge "Remove default override for config options policy_file" 2024-11-25 23:24:13 +00:00
Takashi Kajinami ef2a17c78e Replace distutils
distutils module was deprecated in 3.10 and was removed in Python
3.12 .

https://docs.python.org/3.11/library/distutils.html

Closes-Bug: #2083518
Change-Id: Id28c0a7aaabcda0f1f9a6a7402b77a09565899f7
2024-11-23 08:11:45 +00:00
René Ribaud 0f9001f06e Attach Manila shares via virtiofs (manila abstraction)
This patch is inspired by /nova/volume/cinder.py, it is an abstraction to
the manila service.

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
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/889519

Change-Id: I44ab37ec2c15fcfc351c42216660bda39461b163
2024-11-22 14:42:49 +01:00
Ghanshyam Mann ce045b9723 Remove default override for config options policy_file
olso.policy 4.5.0[1] changed the config options policy_file
default value to 'policy.yaml', which means it is changed
for all the OpenStack services and they do not need to
override the default anymore.

NOTE: There is no change in behaviour here, oslo.policy provides
the same configuration that services have overridden till now.

[1] https://review.opendev.org/c/openstack/releases/+/934012
[2] https://review.opendev.org/c/openstack/requirements/+/934295

Change-Id: I6e4c517eb81a50056563189753b21191bbf6b92d
2024-11-16 02:56:03 +00:00
Balazs Gibizer 07295b0f99 [libvirt]Support hw_vif_model = igb
Makes igb vif model supported for hosts with libvirt 9.3.0 and qemu
8.0.0 or higher.

Implements: blueprint igb-vif-model

Depends-On: https://review.opendev.org/c/openstack/os-traits/+/928582
(merged, released as 3.2.0)

Change-Id: I6a1d8058c640e5dc015889610c4ae864ed9a5ccb
2024-10-24 13:15:10 +02:00
Gorka Eguileor 8c1a47c9cf Support os-brick specific lock_path
Note: Initially this patch was related to new feature, but now it has
become a bug since os-brick's `setup` method is not being called and it
can create problems if os-brick changes.

As a new feature, os-brick now supports setting the location of file
locks in a different location from the locks of the service.

The functionality is intended for HCI deployments and hosts that are
running Cinder and Glance using Cinder backend.  In those scenarios the
service can use a service specific location for its file locks while
only sharing the location of os-brick with the other services.

To leverage this functionality the new os-brick code is needed and
method ``os_brick.setup`` needs to be called once the service
configuration options have been loaded.

The default value of the os-brick ``lock_path`` is the one set in
``oslo_concurrency``.

This patch adds support for this new feature in a non backward
compatible way, so it requires an os-brick version bump in the
requirements.

The patch also ensures that ``tox -egenconfig`` includes the os-brick
configuration options when generating the sample config.

Closes-Bug: #2081859
Change-Id: I1b81eb65bd145869e8cf6f3aabc6ade58f832a19
2024-09-24 18:07:04 +02:00
Zuul b6f60a11a3 Merge "Remove default override for RBAC config options" 2024-09-03 22:07:54 +00:00
Zuul 46b76da3ad Merge "Report availability of stateless firmware support" 2024-08-29 18:25:53 +00:00
Dan Smith d854e7cc16 Use format_inspector from oslo
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
2024-08-26 07:21:48 -07:00
Takashi Kajinami b475f0f99b Report availability of stateless firmware support
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
2024-08-20 09:16:40 +09:00
Ghanshyam Mann c79a73bd42 Remove default override for RBAC config options
RBAC config options enforce_scope and enforce_new_defaults
were disabled by default in oslo.policy and Nova had to override
the default value to enable those by default. Now oslo.policy
(4.4.0 onwards[1]) changed the default values[2] and enabled
by default for all the services. OpenStack service does not need
to override the default anymore.

NOTE: There is no change in behaviour here, oslo.policy provides the
same configuration that Nova has overridden till now.

[1] https://review.opendev.org/c/openstack/releases/+/925032
[2] https://review.opendev.org/c/openstack/oslo.policy/+/924283

Depends-On: https://review.opendev.org/c/openstack/requirements/+/925464

Change-Id: Ic0b5a75f01024e322ecbcd49f8caae0a6ab5c048
2024-08-02 18:36:00 +00:00
Takashi Kajinami b4ff81c329 Remove old excludes
These are detected as errors since the clean up was done[1] in
the requirements repository.

[1] 314734e938f107cbd5ebcc7af4d9167c11347406

Bump the minimum versions to avoid installing these known bad versions.

Change-Id: I5ab0c3a1ac208e3967e65c298573079283a7b6cd
2024-05-01 01:30:04 +09:00
Zuul 8ac050c253 Merge "Packed virtqueue support was added." 2023-11-30 12:12:03 +00:00
Danylo Vodopianov eb8519d811 Packed virtqueue support was added.
1) Extend flavor/image extra spec.
2) New xml parameter for qemu command was added.
3) New request filter added for scheduler.
4) Unit and Functional tests were updated
5) Requirments was updated ( os-traits = 3.0.0 )
6) Releasnote was added

Nova spec: https://review.opendev.org/c/openstack/nova-specs/+/868377

Depends-On: https://review.opendev.org/c/openstack/os-traits/+/876069
Change-Id: I789eeae86947e9a3cbd7d5fcc58d2aabe3b8b84c
2023-11-29 16:06:33 +02:00
Zuul a507b12df1 Merge "Bump jsonschema minimum to 4.0.0" 2023-11-17 12:57:23 +00:00
Nobuhiro MIKI 2fd034ec48 libvirt: Add 'COMPUTE_ADDRESS_SPACE_*' traits support
Based on the Libvirt and QEMU versions, two traits,
COMPUTE_ADDRESS_SPACE_PASSTHROUGH and COMPUTE_ADDRESS_SPACE_EMULATED,
are controlled. Since the two are supported from the same version on
the Libvirt and QEMU, Nova handles them in the same way.

Blueprint: libvirt-maxphysaddr-support
Depends-On: https://review.opendev.org/c/openstack/os-traits/+/871226
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
Change-Id: If6c7169b7b8f43ad15a8992831824fb546e85aab
2023-07-24 17:09:19 +09:00
Stephen Finucane 44f4f2f81b Bump jsonschema minimum to 4.0.0
This allows us to drop some logic from tests.

Change-Id: Idc11c1ce6e208774314a5a867789958372f0d591
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-02-22 18:42:36 +00:00
Stephen Finucane fd39e4b4be db: Remove legacy migrations
sqlalchemy-migrate does not (and will not) support sqlalchemy 2.0. We
need to drop these migrations to ensure we can upgrade our sqlalchemy
version.

Change-Id: I7756e393b78296fb8dbf3ca69c759d75b816376d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-02-01 17:00:03 +00:00
Tobias Urdin c59db128a0 Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: If1128fe0faacef757ed10023c00a67e5ec0440bd
2023-01-17 15:06:41 +01:00
Ghanshyam Mann d97af33c06 Enable new defaults and scope checks by default
As discussed in PTG, we need to test the new RBAC in the
integrated gate and accordingly enable the new defaults
and scope check by default. A new integrated testing job
has been added and results show that the new defaults and
scope checks are working fine. During testing, we found a
few bugs in neutron policies but all are fixed now.

enforce_scope and enforce_new_defaults are oslo policy config
options but they are per service level and the default value
can be overridden. Oslo policy 3.11.0 version allows to override
the default value for these config options[1] so upgrading the
oslo policy version in requirements.txt

Depends-On: https://review.opendev.org/c/openstack/devstack/+/869781
Depends-On: https://review.opendev.org/c/openstack/placement/+/869525

[1] https://github.com/openstack/oslo.policy/blob/3.11.0/oslo_policy/opts.py#L125

Change-Id: I977b2daedf880229c8d364ca011f2ea965b86e3a
2023-01-10 23:37:13 -06:00
Rodolfo Alonso Hernandez 688fd7b427 Bump minimum version of os-vif to 3.1.0
This new os-vif version implements [1]. Now os-vif (Nova that
uses this library) is responsible of deleting the trunk bridges.
No other change is needed in Nova.

Please check [2] for context.

[1]https://review.opendev.org/c/openstack/os-vif/+/841499
[2]https://lists.openstack.org/pipermail/openstack-discuss/2022-April/028164.html

Related-Bug: #1869244
Change-Id: Icb5744497faa8761eb0891cc8c347dfaa71f1f29
2022-11-14 08:02:30 +01:00
Thomas Goirand 6a06a57290 requires os-traits >= 2.9.0
Without the latest version, nova fails many unit tests (it failed
with os-traits 2.7.0 at least).

Closes-Bug: #1990121
Change-Id: I6b320ae1f9058aaa5bac91c7c7ca60136e0cee5c
2022-09-19 08:47:51 +00:00
Balazs Gibizer 8f5fd2ae46 Bump min oslo.concurrencty to >= 5.0.1
The oslo.concurrency 5.0.1 fixes the fair lock we use heavily in the
ResourceTracker.

Closes-Bug: #1988311
Change-Id: I68914b2e21726138ee9a178fdf6a8bb6389c09be
2022-09-13 18:09:00 +02:00
Stephen Finucane deae814611 Remove the PowerVM driver
The PowerVM driver was deprecated in November 2021 as part of change
Icdef0a03c3c6f56b08ec9685c6958d6917bc88cb. As noted there, all
indications suggest that this driver is no longer maintained and may be
abandonware. It's been some time and there's still no activity here so
it's time to abandon this for real.

This isn't as tied into the codebase as the old XenAPI driver was, so
removal is mostly a case of deleting large swathes of code. Lovely.

Change-Id: Ibf4f36136f2c65adad64f75d665c00cf2de4b400
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-08-02 15:31:19 +02:00
Stephen Finucane 2709e30956 Fix compatibility with jsonschema 4.x
This changed one of the error messages we depend on [1].

[1] https://github.com/python-jsonschema/jsonschema/commit/641e9b8c

Change-Id: I643ec568ee2eb2ec1a555f813fd2f1acff915afa
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-07-18 12:30:25 +01:00
Stephen Finucane e1a925772b Remove unused requirement
We no longer support Python 3.6 so there's no need for Python 3.6-only
dependencies.

Change-Id: I139e454a2c6e49a1d5229c90a56d518b0d96ca57
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-07-18 12:30:25 +01:00
Ghanshyam Mann 4c339c10e3 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: Ifbc383f6d4c858189cee55e67b4d4274d9c3358a
2022-04-29 20:56:30 -05:00
Takashi Kajinami ca8e4dad7f Sync rootwrap.conf from oslo.rootwrap
The current rootwrap.conf file is outdated and doesn't include some
parameters. This change updates the content to make it consistent with
the latest example file in oslo.rootwrap.

Change-Id: I989b7da5ff6afae0c1a476e01c3df07870be5f74
2022-04-05 12:14:24 +01:00
John Garbutt 3b69f959a8 Add logic to enforce local api and db limits
Local API and DB limits are limits on resources that are counted either
as an API request parameter (example: server metadata items) or as
records in the database (example: server key pairs).

Future patches will make use of this logic, and actually enforce the
limits. This patch just adds the infrastructure to allow for the
enforcement of the limits.

We are moving all existing quotas to be managed via Keystone's
unified limits.

To stop confusion between injected_file_path_length and
injected_file_path_bytes, the unified limit in Keystone will use the
latter name to match the name used the API.

These local limits are all about preventing excessive load on the API
and database and have little to do with resource usage. These limits
are represented by keystone registered limits only, accordingly.

Local limits include things that just limit items in an API request:
* metadata_items
* injected_files
* injected_file_content_bytes
* injected_file_path_bytes

Local limits also include things that are stored in the database:
* key_pairs
* server_groups
* server_group_members

Some resource names have been changed to prepend a prefix of "server_"
in order to disambiguate them from other potential unified limits in
keystone:

* metadata_items => server_metadata_items
* injected_files => server_injected_files
* injected_file_content_bytes => server_injected_file_content_bytes
* injected_file_path_bytes => server_injected_file_path_bytes
* key_pairs => server_key_pairs

Note that each of the above are counted via a different scope. This new
code ensures that key_pairs are counted per user, server_groups are
counted per project and server_group_members are counted per
server_group.

Note: Previously server_group_member were counted per user inside each
server_group, which has proved very confusing, as adding more users into
a project increases the maximum size of allowed for a server_group.

blueprint unified-limits-nova

Change-Id: I0b6f4d29aaee1d71541a95cbecfd0708aac325d2
2022-02-24 16:21:02 +00:00
yuval brave b5e2128f38 Lightbits LightOS driver
This commit introduces the LightOS driver for nova. LightOS is a
software-defined disaggregated clustered storage solution running on
commodity servers with commodity SSDs. It it developed by Lightbits
Labs (https://www.lightbitslabs.com) and is actively developed and
maintained. LightOS is proprietary but the openstack drivers are
licensed under Apache v2.0.

The Cinder driver for LightOS currently supports the following
functionality:

Create volume
Delete volume
Attach volume
Detach volume
Create image from volume
create volume from image
Live migration
Volume replication
Thin provisioning
Multi-attach
Extend volume
Create snapshot
Delete snapshot
Create volume from snapshot
Create volume from volume (clone)

This driver has been developed and has been in use for a couple of
years by Lightbits and our clients. We have tested it extensively
internally with multiple openstack versions, including Queens, Rocky,
Stein, and Train. We have also tested it with master (19.1 xena) and we
are working to extend testing to cover additional openstack releases.

We are glad to join the openstack community and hope to get your
feedback and comments on this driver, and if it is acceptable, to see
it merged into the tree.

Note: the patch depends on os-brick 5.2.0. That version also increased
the lower constraints of several dependencies, thus needs nova to
increase those as well in requirements.txt, lower-constraints.txt and
setup.cfg.

Depends-On: I2e86fa84049053b7c75421d33ad1a1af459ef4e0
Signed-off-by: Yuval Brave  yuval@lightbitslabs.com
Change-Id: Ic314b26695d9681d31a18adcec0794c2ff41fe71
2022-02-22 16:17:29 +01:00
Zuul b6f8af052d Merge "Move optional build dependencies to 'extras'" 2022-02-09 21:09:19 +00:00
Dmitrii Shcherbakov 6294c144e7 Bump os-traits to 2.7.0
The new version contains changes needed by the multi-architecture
support and off-path SmartNIC DPU support code.

Needed-By: I168d3ccc914f25a3d4255c9b319ee6b91a2f66e2
Needed-By: Ia070a29186c6123cf51e1b17373c2dc69676ae7c
Change-Id: Ic1179f3e5e2c1aeb069972f21edffe5b003eb525
2022-02-09 01:23:27 +03:00
Stephen Finucane 86d87be8db Move optional build dependencies to 'extras'
...and start skipping the relevant tests in 'nova.tests.unit.virt' if
these dependencies are not present. Thanks to hacking rules N311 and
N312, which prevent virt drivers using code from other virt drivers,
simply skipping the unit tests for a virt driver module is enough to
ensure we never load those modules.

This means users that want to use the powervm driver can install the
required dependencies using e.g. 'pip install .[powervm]', and packagers
can choose to skip packaging a dependency safe in the knowledge that the
relevant tests will be skipped.

Change-Id: I3787f9afd78cd0a7c7feb4dfe1bcb21437b5a128
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-01-28 12:27:06 +00:00