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] 2cd0b1e14a/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 <thaleselero.cervi@windriver.com>
Change-Id: Iaf31d3b5e2fc03b4783473e4329a780a516a9d43
This commit is contained in:
Thales Elero Cervi 2023-06-27 15:41:59 -03:00
parent 0ec63a4667
commit 6e4f3df557

View File

@ -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,',');
}