From ace2eb097ed221eb5110df9d470306234a6b93ef Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Tue, 19 Jan 2021 08:22:34 +0100 Subject: [PATCH] Add NovaLibvirtMaxQueues role parameter to set [libvirt]/max_queues Add NovaLibvirtMaxQueues role parameter to set [libvirt]/max_queues in nova.conf of the compute. Default 0 corresponds to not set meaning the legacy limits based on the reported kernel major version will be used. Conflicts: deployment/nova/nova-compute-container-puppet.yaml Depends-On: https://review.opendev.org/c/openstack/puppet-nova/+/772805 Change-Id: I353e8ca2676bbdceb056f8b2b084bc5102f52c1f (cherry picked from commit 67a5a788971c1e2475cd260d91149b7d3d3a2012) --- .../nova/nova-compute-container-puppet.yaml | 24 +++++++++++++++++++ ...a_libvirt_max_queues-8024fc63105bd25d.yaml | 6 +++++ 2 files changed, 30 insertions(+) create mode 100644 releasenotes/notes/nova_libvirt_max_queues-8024fc63105bd25d.yaml diff --git a/deployment/nova/nova-compute-container-puppet.yaml b/deployment/nova/nova-compute-container-puppet.yaml index 5ab4827f7b..1f1f47c23e 100644 --- a/deployment/nova/nova-compute-container-puppet.yaml +++ b/deployment/nova/nova-compute-container-puppet.yaml @@ -527,6 +527,17 @@ parameters: ownership and selinux context. default: - 'triliovault-mounts' + NovaLibvirtMaxQueues: + type: number + description: > + Add parameter to configure the libvirt max_queues. The maximum number + of virtio queue pairs that can be enabled when creating a multiqueue guest. + The number of virtio queues allocated will be the lesser of the CPUs + requested by the guest and the max value defined. + Default 0 corresponds to not set + default: 0 + tags: + - role_specific # DEPRECATED: the following options are deprecated and are currently maintained # for backwards compatibility. They will be removed in future release. @@ -724,6 +735,8 @@ resources: NovaDisableImageDownloadToRbd: {get_param: NovaDisableImageDownloadToRbd} NovaLiveMigrationPermitPostCopy: {get_param: NovaLiveMigrationPermitPostCopy} NovaLiveMigrationPermitAutoConverge: {get_param: NovaLiveMigrationPermitAutoConverge} + NovaLibvirtMaxQueues: {get_param: NovaLibvirtMaxQueues} + conditions: enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]} @@ -779,6 +792,12 @@ conditions: - equals: [{get_param: [RoleParameters, NovaLiveMigrationPermitAutoConverge]}, ''] - equals: [{get_param: NovaLiveMigrationPermitAutoConverge}, ''] + nova_libvirt_max_queues_set: + not: + or: + - equals: [{get_param: NovaLibvirtMaxQueues}, 0] + - equals: [{get_param: [RoleParameters, NovaLibvirtMaxQueues]}, 0] + outputs: role_data: description: Role data for the Nova Compute service. @@ -896,6 +915,11 @@ outputs: - libvirt_file_backed_memory_enabled - '1.0' - {get_attr: [RoleParametersValue, value, 'nova::ram_allocation_ratio']} + - + if: + - nova_libvirt_max_queues_set + - nova::compute::libvirt::max_queues: {get_attr: [RoleParametersValue, value, nova_libvirt_max_queues]} + - {} service_config_settings: rsyslog: tripleo_logging_sources_nova_compute: diff --git a/releasenotes/notes/nova_libvirt_max_queues-8024fc63105bd25d.yaml b/releasenotes/notes/nova_libvirt_max_queues-8024fc63105bd25d.yaml new file mode 100644 index 0000000000..ffb100a3c4 --- /dev/null +++ b/releasenotes/notes/nova_libvirt_max_queues-8024fc63105bd25d.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add NovaLibvirtMaxQueues role parameter to set [libvirt]/max_queues in + nova.conf of the compute. Default 0 corresponds to not set meaning the + legacy limits based on the reported kernel major version will be used.