From 90c19b58440ec78384415f1a92c60e175069c6f3 Mon Sep 17 00:00:00 2001 From: Pablo Rodriguez Nava Date: Fri, 9 Feb 2024 09:17:22 +0100 Subject: [PATCH] Use nic aliases in the edpm network template To allow easier automation and avoid modifying the os-net-config template of each VA to just change the interface name of the bridge change the explicit interface name to an alias. This requires to add the os-net-config interfaces alias table to ensure proper translation between the alias and the interface name. --- examples/va/hci/edpm-pre-ceph/values.yaml | 5 ++++- examples/va/nfv/ovs-dpdk/edpm/values.yaml | 9 +++++++-- examples/va/nfv/sriov/edpm/values.yaml | 10 +++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/examples/va/hci/edpm-pre-ceph/values.yaml b/examples/va/hci/edpm-pre-ceph/values.yaml index d12f7ae34..3a14192ef 100644 --- a/examples/va/hci/edpm-pre-ceph/values.yaml +++ b/examples/va/hci/edpm-pre-ceph/values.yaml @@ -27,6 +27,9 @@ data: edpm_iscsid_image: '{{ registry_url }}/openstack-iscsid:{{ image_tag }}' edpm_logrotate_crond_image: '{{ registry_url }}/openstack-cron:{{ image_tag }}' edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-compute: + nic2: enp7s0 edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} @@ -46,7 +49,7 @@ data: routes: {{ ctlplane_host_routes }} members: - type: interface - name: enp7s0 + name: nic2 mtu: {{ min_viable_mtu }} # force the MAC address of the bridge to this interface primary: true diff --git a/examples/va/nfv/ovs-dpdk/edpm/values.yaml b/examples/va/nfv/ovs-dpdk/edpm/values.yaml index cace1f066..d6632c117 100644 --- a/examples/va/nfv/ovs-dpdk/edpm/values.yaml +++ b/examples/va/nfv/ovs-dpdk/edpm/values.yaml @@ -42,6 +42,11 @@ data: # edpm_network_config # These vars are edpm_network_config role vars edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-compute: + nic2: eno2 + nic3: eno3 + nic4: eno4 edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} @@ -86,7 +91,7 @@ data: name: dpdk1 members: - type: interface - name: eno3 + name: nic3 - type: ovs_user_bridge name: br-link2 use_dhcp: false @@ -96,7 +101,7 @@ data: name: dpdk2 members: - type: interface - name: eno4 + name: nic4 # These vars are for the network config templates themselves and are # considered EDPM network defaults. diff --git a/examples/va/nfv/sriov/edpm/values.yaml b/examples/va/nfv/sriov/edpm/values.yaml index 137db13c4..ce3e07aaf 100644 --- a/examples/va/nfv/sriov/edpm/values.yaml +++ b/examples/va/nfv/sriov/edpm/values.yaml @@ -29,11 +29,15 @@ data: - hostname: clock.redhat.com # CPU pinning settings edpm_kernel_args: "default_hugepagesz=1GB hugepagesz=1G hugepages=16 intel_iommu=on iommu=pt isolcpus=4-23,28-47" - edpm_tuned_profile: "cpu-partitioning-powersave" + edpm_tuned_profile: "cpu-partitioning-powersave" edpm_tuned_isolated_cores: "4-23,28-47" # edpm_network_config # These vars are edpm_network_config role vars edpm_network_config_hide_sensitive_logs: false + edpm_network_config_os_net_config_mappings: + edpm-compute: + nic2: enp7s0 + nic3: eno4 edpm_network_config_template: | --- {% set mtu_list = [ctlplane_mtu] %} @@ -53,7 +57,7 @@ data: routes: {{ ctlplane_host_routes }} members: - type: interface - name: enp7s0 + name: nic2 mtu: {{ min_viable_mtu }} # force the MAC address of the bridge to this interface primary: true @@ -67,7 +71,7 @@ data: routes: {{ lookup('vars', networks_lower[network] ~ '_host_routes') }} {% endfor %} - type: sriov_pf - name: eno4 + name: nic3 numvfs: 10 use_dhcp: false promisc: true