Customize sysinv dpdk_elf_file for OVS-DPDK
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 the required logic on sysinv ovs puppet module such that it is able to customize the hiera data with OVS-DPDK correct ELF file. This is not strictly necessary, since it is configuring sysinv with query_pci_id default ELF value, but would be an example for anyone that wants to use a different virtual switch in the future and needs to update the sysinv configuration likewise. [1] https://review.opendev.org/c/starlingx/config/+/872979 [2] https://opendev.org/starlingx/config/src/branch/master/sysinv/sysinv/sysinv/scripts/query_pci_id#L34 Test Plan: PASS - Build sysinv packages PASS - Build a custom stx ISO with the new packages 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 Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/887102 Signed-off-by: Thales Elero Cervi <thaleselero.cervi@windriver.com> Change-Id: I4e33fb86199b3a0de7015aab44a66ef84138fca3
This commit is contained in:
parent
55f6ca8659
commit
a5050c48fa
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (c) 2018-2021 Wind River Systems, Inc.
|
||||
# Copyright (c) 2018-2023 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
@ -13,6 +13,8 @@ from sysinv.puppet import interface
|
|||
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
OVS_DPDK_ELF = '/usr/sbin/ovs-vswitchd'
|
||||
|
||||
|
||||
class OVSPuppet(base.BasePuppet):
|
||||
"""Class to encapsulate puppet operations for vswitch configuration"""
|
||||
|
@ -20,6 +22,16 @@ class OVSPuppet(base.BasePuppet):
|
|||
def __init__(self, *args, **kwargs):
|
||||
super(OVSPuppet, self).__init__(*args, **kwargs)
|
||||
|
||||
def get_system_config(self):
|
||||
config = {}
|
||||
|
||||
if self._vswitch_type() == constants.VSWITCH_TYPE_OVS_DPDK:
|
||||
config.update({
|
||||
'sysinv::agent::dpdk_elf_file': OVS_DPDK_ELF,
|
||||
})
|
||||
|
||||
return config
|
||||
|
||||
def get_host_config(self, host):
|
||||
config = {}
|
||||
if constants.WORKER in utils.get_personalities(host):
|
||||
|
|
Loading…
Reference in New Issue