Allow to skip discovered mdevs

Currently there is no way to avoid auto-discovery of mdev devices.
The only way to avoid them propagating to nova.conf is through
the config override.

Change-Id: Ie1c40a427599e610278262cfdb55fdcf017d4ede
This commit is contained in:
Dmitriy Rabotyagov
2025-05-21 17:43:18 +02:00
parent 17497426f4
commit 8968c235ec
2 changed files with 14 additions and 2 deletions

View File

@@ -580,6 +580,12 @@ nova_vendor_data_overrides: {}
nova_api_metadata_uwsgi_ini_overrides: {}
nova_api_os_compute_uwsgi_ini_overrides: {}
# Attempt to auto-discover available vGPU devices.
# It is recommended to define them explicitly through ``nova_enabled_mdev_types``.
# Doing so has precedence over discovered ones and does not require to
# disable the variable explicitly.
nova_discover_mdev_types: true
# Enabled vGPU Types - dict defining 'type' and 'address' (optional) of vGPU
# an address is only required when supporting more than one physical GPU on the host
# Example 1:

View File

@@ -119,8 +119,14 @@
tags:
- always
- name: Importing nova_mdev_detect tasks
ansible.builtin.import_tasks: nova_mdev_detect.yml
- name: Including nova_mdev_detect tasks
ansible.builtin.include_tasks: nova_mdev_detect.yml
args:
apply:
tags:
- always
when:
- nova_discover_mdev_types | bool
tags:
- always