From c46b0710a61f098887d4a91afe925e53f70f485c Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 19 Aug 2025 21:56:02 +0900 Subject: [PATCH] Prepare for voxpupuli-puppet-lint-plugins Fix new lint errors detected when full of the voxpupili lint plugins are enabled. Change-Id: If7634f12d8cd965784791f60515e8b16532ec1e3 Signed-off-by: Takashi Kajinami --- manifests/dpdk.pp | 15 ++++++--------- manifests/ovs.pp | 3 +-- manifests/pki/cacert.pp | 1 - manifests/pki/cert.pp | 3 +-- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/manifests/dpdk.pp b/manifests/dpdk.pp index 748f637e..632952ef 100644 --- a/manifests/dpdk.pp +++ b/manifests/dpdk.pp @@ -125,7 +125,6 @@ class vswitch::dpdk ( Hash $vs_config = {}, Boolean $skip_restart = false, ) { - $restart = !$skip_restart kmod::load { 'vfio-pci': } @@ -147,12 +146,12 @@ class vswitch::dpdk ( $dpdk_configs = { 'other_config:dpdk-extra' => { value => $memory_channels_conf, restart => $restart }, - 'other_config:dpdk-socket-mem' => { value => join(any2array($socket_mem), ','), restart => $restart}, - 'other_config:dpdk-socket-limit' => { value => join(any2array($socket_limit), ','), restart => $restart}, - 'other_config:dpdk-lcore-mask' => { value => $dpdk_lcore_mask, restart => $restart}, - 'other_config:pmd-cpu-mask' => { value => $pmd_core_mask, restart => $restart}, - 'other_config:n-revalidator-threads' => { value => $revalidator_cores}, - 'other_config:n-handler-threads' => { value => $handler_cores}, + 'other_config:dpdk-socket-mem' => { value => join(any2array($socket_mem), ','), restart => $restart }, + 'other_config:dpdk-socket-limit' => { value => join(any2array($socket_limit), ','), restart => $restart }, + 'other_config:dpdk-lcore-mask' => { value => $dpdk_lcore_mask, restart => $restart }, + 'other_config:pmd-cpu-mask' => { value => $pmd_core_mask, restart => $restart }, + 'other_config:n-revalidator-threads' => { value => $revalidator_cores }, + 'other_config:n-handler-threads' => { value => $handler_cores }, } $dpdk_dependencies = { @@ -258,7 +257,6 @@ class vswitch::dpdk ( wait => false, } } - } else { vs_config { 'other_config:pmd-auto-lb': ensure => absent, wait => false; @@ -291,5 +289,4 @@ class vswitch::dpdk ( create_resources('vs_config', $dpdk_configs, $dpdk_dependencies) create_resources('vs_config', $vs_config) - } diff --git a/manifests/ovs.pp b/manifests/ovs.pp index ee16c3f2..b6eeee10 100644 --- a/manifests/ovs.pp +++ b/manifests/ovs.pp @@ -42,7 +42,7 @@ # immedicate network distuption caused by restarting the ovs daemon. # Defaults to false. # -class vswitch::ovs( +class vswitch::ovs ( String[1] $package_name, String[1] $service_name, String $package_ensure = 'present', @@ -52,7 +52,6 @@ class vswitch::ovs( Hash $vs_config = {}, Boolean $skip_restart = false, ) { - $restart = !$skip_restart if $enable_hw_offload { diff --git a/manifests/pki/cacert.pp b/manifests/pki/cacert.pp index 53b207af..2e519aa7 100644 --- a/manifests/pki/cacert.pp +++ b/manifests/pki/cacert.pp @@ -3,7 +3,6 @@ # Initialize CA authority # class vswitch::pki::cacert { - exec { 'ovs-pki-init-ca-authority': command => ['ovs-pki', 'init', '--force'], creates => '/var/lib/openvswitch/pki/switchca', diff --git a/manifests/pki/cert.pp b/manifests/pki/cert.pp index 6463a6f1..34e78c43 100644 --- a/manifests/pki/cert.pp +++ b/manifests/pki/cert.pp @@ -8,10 +8,9 @@ # (Optional) The directory in which the cert files are generated. # Defaults to '/etc/openvswitch' # -define vswitch::pki::cert( +define vswitch::pki::cert ( Stdlib::Absolutepath $cert_dir = '/etc/openvswitch', ) { - exec { "ovs-req-and-sign-cert-${name}": command => ['ovs-pki', 'req+sign', $name], cwd => $cert_dir,