From 4d5b87e7adab0eb09df82f0248a3e4c1d4ed7d88 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 4 Aug 2023 14:01:39 +0900 Subject: [PATCH] Add support for [libvirt] tb_cache_size Depends-on: https://review.opendev.org/c/openstack/nova/+/868419 Change-Id: If3c8d35a2f39bf14699deff8413f5f727bf4c5e3 --- manifests/compute/libvirt.pp | 6 ++++++ releasenotes/notes/tb_cache_size-68e4d02b579a4a50.yaml | 4 ++++ spec/classes/nova_compute_libvirt_spec.rb | 3 +++ 3 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/tb_cache_size-68e4d02b579a4a50.yaml diff --git a/manifests/compute/libvirt.pp b/manifests/compute/libvirt.pp index b1c8d5431..f2bc9771f 100644 --- a/manifests/compute/libvirt.pp +++ b/manifests/compute/libvirt.pp @@ -229,6 +229,10 @@ # reboot request is made. # Defaults to $facts['os_service_default'] # +# [*tb_cache_size*] +# (optional) The tb-cache size (in MiB) of each guest VM. +# Defaults to $facts['os_service_default'] +# class nova::compute::libvirt ( $ensure_package = 'present', $virt_type = 'kvm', @@ -274,6 +278,7 @@ class nova::compute::libvirt ( $max_queues = $facts['os_service_default'], $num_memory_encrypted_guests = $facts['os_service_default'], $wait_soft_reboot_seconds = $facts['os_service_default'], + $tb_cache_size = $facts['os_service_default'], ) inherits nova::params { include nova::deps @@ -376,6 +381,7 @@ class nova::compute::libvirt ( 'libvirt/max_queues': value => $max_queues; 'libvirt/num_memory_encrypted_guests': value => $num_memory_encrypted_guests; 'libvirt/wait_soft_reboot_seconds': value => $wait_soft_reboot_seconds; + 'libvirt/tb_cache_size': value => $tb_cache_size; } # cpu_model param is only valid if cpu_mode=custom diff --git a/releasenotes/notes/tb_cache_size-68e4d02b579a4a50.yaml b/releasenotes/notes/tb_cache_size-68e4d02b579a4a50.yaml new file mode 100644 index 000000000..5bda07aea --- /dev/null +++ b/releasenotes/notes/tb_cache_size-68e4d02b579a4a50.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``nova::compute::libvirt::tb_cache_size`` parameter has been added. diff --git a/spec/classes/nova_compute_libvirt_spec.rb b/spec/classes/nova_compute_libvirt_spec.rb index 5149ddf97..59acff028 100644 --- a/spec/classes/nova_compute_libvirt_spec.rb +++ b/spec/classes/nova_compute_libvirt_spec.rb @@ -81,6 +81,7 @@ describe 'nova::compute::libvirt' do it { is_expected.to contain_nova_config('libvirt/max_queues').with_value('')} it { is_expected.to contain_nova_config('libvirt/num_memory_encrypted_guests').with_value('')} it { is_expected.to contain_nova_config('libvirt/wait_soft_reboot_seconds').with_value('')} + it { is_expected.to contain_nova_config('libvirt/tb_cache_size').with_value('')} end describe 'with params' do @@ -124,6 +125,7 @@ describe 'nova::compute::libvirt' do :max_queues => 4, :num_memory_encrypted_guests => 255, :wait_soft_reboot_seconds => 120, + :tb_cache_size => 32, } end @@ -166,6 +168,7 @@ describe 'nova::compute::libvirt' do it { is_expected.to contain_nova_config('libvirt/max_queues').with_value(4)} it { is_expected.to contain_nova_config('libvirt/num_memory_encrypted_guests').with_value(255)} it { is_expected.to contain_nova_config('libvirt/wait_soft_reboot_seconds').with_value(120)} + it { is_expected.to contain_nova_config('libvirt/tb_cache_size').with_value(32)} it { is_expected.to contain_service('libvirt').with(