Add new role parameter NovaLibvirtNumPciePorts

Add role parameter NovaLibvirtNumPciePorts which sets `libvirt/num_pcie_ports`
to specify the number of PCIe ports an instance will get.
Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a
target instance will get. Some will be used by default, rest will be available
for hotplug use. When using the 'q35' machine type, by default, it allows only
a *single* PCIe device to be hotplugged.  And Nova currently sets
'num_pcie_ports' to "0" (which means, it defaults to libvirt's "1"), which is
not sufficient for hotplug use.

Default for NovaLibvirtNumPciePorts is 16.

Change-Id: Ida27b52a091640545aecc982fc1a509fb5107db8
Closes-Bug: #1831701
Depends-On: I16732c9d6013112381cfad999540dd41ec3d7ba3
This commit is contained in:
Martin Schuppert 2019-06-05 09:28:10 +02:00
parent 4125f12527
commit 0f6dabc725
2 changed files with 25 additions and 0 deletions

View File

@ -283,6 +283,17 @@ parameters:
type: string
default: 'regionOne'
description: Keystone region for endpoint
NovaLibvirtNumPciePorts:
description: >
Set `num_pcie_ports` to specify the number of PCIe ports an
instance will get.
Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a
target instance will get. Some will be used by default, rest will be available
for hotplug use.
default: 16
type: number
tags:
- role_specific
resources:
@ -344,6 +355,7 @@ resources:
nfs_share: NovaNfsShare
nfs_options: NovaNfsOptions
nfs_vers: NovaNfsVersion
nova::compute::libvirt::num_pcie_ports: NovaLibvirtNumPciePorts
- values: {get_param: [RoleParameters]}
- values:
NovaVcpuPinSet: {get_param: NovaVcpuPinSet}
@ -363,6 +375,7 @@ resources:
NovaNfsShare: {get_param: NovaNfsShare}
NovaNfsOptions: {get_param: NovaNfsOptions}
NovaNfsVersion: {get_param: NovaNfsVersion}
NovaLibvirtNumPciePorts: {get_param: NovaLibvirtNumPciePorts}
conditions:
enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]}

View File

@ -0,0 +1,12 @@
---
features:
- |
Add role parameter NovaLibvirtNumPciePorts which sets `libvirt/num_pcie_ports`
to specify the number of PCIe ports an instance will get.
Libvirt allows a custom number of PCIe ports (pcie-root-port controllers) a
target instance will get. Some will be used by default, rest will be available
for hotplug use. When using the 'q35' machine type, by default, it allows only
a *single* PCIe device to be hotplugged. And Nova currently sets
'num_pcie_ports' to "0" (which means, it defaults to libvirt's "1"), which is
not sufficient for hotplug use.
Default for NovaLibvirtNumPciePorts is 16.