From d00312805a9eef97c706dd20a05bed25f61f37a2 Mon Sep 17 00:00:00 2001 From: Rajesh Tailor Date: Mon, 7 Sep 2020 12:18:53 +0530 Subject: [PATCH] Expose new parameter `NovaVGPUTypesDeviceAddressesMapping` To support multiple vgpu types configuration, add new parameter `NovaVGPUTypesDeviceAddressesMapping` where vgpu-type is key and list of device_addresses are value. Depends-On: https://review.opendev.org/#/c/754900/ Change-Id: Ifc30bbef66717cafb5ec2262be8fe07af1e60772 (cherry picked from commit 3fd84c24365c1e7ed0498fe8557cebc7ca58e3fb) --- deployment/nova/nova-compute-container-puppet.yaml | 14 ++++++++++++++ .../vgpu-devices-mapping-63dd870f3a00a98a.yaml | 5 +++++ 2 files changed, 19 insertions(+) create mode 100644 releasenotes/notes/vgpu-devices-mapping-63dd870f3a00a98a.yaml diff --git a/deployment/nova/nova-compute-container-puppet.yaml b/deployment/nova/nova-compute-container-puppet.yaml index 72409ca9df..5150f749fe 100644 --- a/deployment/nova/nova-compute-container-puppet.yaml +++ b/deployment/nova/nova-compute-container-puppet.yaml @@ -438,6 +438,18 @@ parameters: type: boolean tags: - role_specific + NovaVGPUTypesDeviceAddressesMapping: + type: json + description: > + Map of vgpu type(s) the instances can get as key and list of corresponding + device addresses as value. + Ex. NovaVGPUTypesDeviceAddressesMapping: {'nvidia-35': ['0000:84:00.0', '0000:85:00.0'], + 'nvidia-36': ['0000:86:00.0']} + where `nvidia-35` and `nvidia-36` are + vgpu types and corresponding values are list of associated device addresses. + default: {} + tags: + - role_specific # DEPRECATED: the following options are deprecated and are currently maintained # for backwards compatibility. They will be removed in future release. @@ -539,6 +551,7 @@ resources: nova_pmem_namespaces: NovaPMEMNamespaces nova::compute::libvirt::remove_unused_original_minimum_age_seconds: NovaImageCacheTTL compute_disable_irqbalance: NovaComputeDisableIrqBalance + nova::compute::vgpu::vgpu_types_device_addresses_mapping: NovaVGPUTypesDeviceAddressesMapping - values: {get_param: [RoleParameters]} - values: NovaVcpuPinSet: {get_param: NovaVcpuPinSet} @@ -615,6 +628,7 @@ resources: NovaPMEMNamespaces: {get_param: NovaPMEMNamespaces} NovaImageCacheTTL: {get_param: NovaImageCacheTTL} NovaComputeDisableIrqBalance: {get_param: NovaComputeDisableIrqBalance} + NovaVGPUTypesDeviceAddressesMapping: {get_param: NovaVGPUTypesDeviceAddressesMapping} conditions: enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]} diff --git a/releasenotes/notes/vgpu-devices-mapping-63dd870f3a00a98a.yaml b/releasenotes/notes/vgpu-devices-mapping-63dd870f3a00a98a.yaml new file mode 100644 index 0000000000..09bc434bb2 --- /dev/null +++ b/releasenotes/notes/vgpu-devices-mapping-63dd870f3a00a98a.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Add parameter `NovaVGPUTypesDeviceAddressesMapping` provide mapping + for multiple vgpu types and corresponding device addresses.