From 6e4f3df5570039adaa63838ef4ee13eabbb84741 Mon Sep 17 00:00:00 2001 From: Thales Elero Cervi Date: Tue, 27 Jun 2023 15:41:59 -0300 Subject: [PATCH] Handle sysinv dpdk_elf_file configuration As part of Debian migration, the sysinv procedure to check DPDK compatibility for each host interface was also updated in order to make it customizable in case one would like to use other virtual switch than the delivered OVS with DPDK support [1]. For other virtual switches, that might or not rely on DPDK, the ELF target that sysinv uses to verify interfaces compatibility must be customizable and the query_pci_id script is already able to use custom values [2]. This change adds to puppet the system configuration that will write, if defined, the correct value for the ELF path. This platform parameter can be overridden on the hiera data so puppet will update sysinv.conf accordingly. For now, when deploying StarlingX with vswitch_type=ovs-dpdk we will override it to the query_pci_id script default value (i.e., the /usr/sbin/ovs-vswitchd ELF) using the respective sysinv puppet module and let it as an example for anyone that is later using a different vswitch which requires this customization [3]. [1] https://review.opendev.org/c/starlingx/config/+/872979 [2] https://opendev.org/starlingx/config/src/commit/2cd0b1e14abca919fd5ae8c27d71e7a82cc72d9a/sysinv/sysinv/sysinv/scripts/query_pci_id#L34 [3] https://review.opendev.org/c/starlingx/config/+/887106 Test Plan: PASS - Build puppet-manifest package PASS - Build a custom stx ISO with the new package PASS - Bootstrap AIO-SX virtual system (vswitch_type=none) and ensure the hiera data was not modified neither sysinv.conf was updated PASS - Bootstrap AIO-SX virtual system (vswitch_type=ovs-dpdk)* and ensure the hiera data was modified correctly and sysinv.conf was updated accordingly * A successful complete installation with ovs-dpdk is still blocked by a bug that will be solved soon: https://bugs.launchpad.net/starlingx/+bug/2008124 Story: 2010317 Task: 46389 Signed-off-by: Thales Elero Cervi Change-Id: Iaf31d3b5e2fc03b4783473e4329a780a516a9d43 --- modules/puppet-sysinv/src/sysinv/manifests/agent.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/puppet-sysinv/src/sysinv/manifests/agent.pp b/modules/puppet-sysinv/src/sysinv/manifests/agent.pp index 95f3a94cb..e3fd79b75 100644 --- a/modules/puppet-sysinv/src/sysinv/manifests/agent.pp +++ b/modules/puppet-sysinv/src/sysinv/manifests/agent.pp @@ -18,7 +18,8 @@ class sysinv::agent ( $agent_driver = false, $package_ensure = 'latest', $enabled = true, - $lldp_drivers = [] + $lldp_drivers = [], + $dpdk_elf_file = undef, ) { include sysinv::params @@ -33,6 +34,12 @@ class sysinv::agent ( } } + if ($::sysinv::agent::dpdk_elf_file != undef) { + sysinv_config { + 'dpdk/dpdk_elf': value => $dpdk_elf_file; + } + } + sysinv_config { 'lldp/drivers': value => join($lldp_drivers,','); }