From 9dcef24aab8ef1c42252f0c2fdb0003fb85bb132 Mon Sep 17 00:00:00 2001 From: Torsten Wendland Date: Thu, 1 Jul 2021 15:30:18 +0200 Subject: [PATCH] Implementation for #200 This is a suggestion for the implementation of #200 I already implemented exactly this code at a customer. It introduces two new variables to var.tfvars to control how many logical ports shall be used for VNIC failover and also to define the capacity of the logical ports. Signed-off-by: Torsten Wendland --- docs/var.tfvars-doc.md | 12 ++++++++++++ modules/2_network/network.tf | 4 ++-- modules/2_network/variables.tf | 2 ++ ocp.tf | 2 ++ var.tfvars | 3 ++- variables.tf | 12 ++++++++++++ 6 files changed, 32 insertions(+), 3 deletions(-) diff --git a/docs/var.tfvars-doc.md b/docs/var.tfvars-doc.md index 3ba787b7a3..04ffad9f4b 100644 --- a/docs/var.tfvars-doc.md +++ b/docs/var.tfvars-doc.md @@ -139,6 +139,18 @@ The following variable is used to set the network adapter type for the VMs. By d network_type = "SRIOV" ``` +The following variable is used to define the amount of SR-IOV Logical Ports used for VNIC failover of the 1st network adapter for the VMs. By default the VMs will use 1, which defines `no VNIC failover`. Any setting higher then 1 creates additional LPs and configures them in a VNIC failover setup. `Be aware of the fact, that RHCOS and some Linux releases might not handle VNIC failover with more then 2 SR-IOV Logical Ports properly. The recommended value is 2 for VNIC failover.` +Valid options are: Any number supported for VNIC failover adapters +``` +sriov_vnic_failover_adapter = 2 +``` + +The following variable is used to define the capacity of SR-IOV Logical Ports of the 1st network adapter for the VMs. By default the VMs will use 2%. +Valid options are: Any number which can be devided by 2 and results in an integer. 100% = 1.0; 80% = 0.80; 60% = 0.60; etc +``` +sriov_capacity = 0.02 +``` + The following variable is used to specify the PowerVC [Storage Connectivity Group](https://www.ibm.com/support/knowledgecenter/SSVSPA_1.4.4/com.ibm.powervc.cloud.help.doc/powervc_storage_connectivity_groups_cloud.html) (SCG). Empty value will use the default SCG ``` scg_id = "" diff --git a/modules/2_network/network.tf b/modules/2_network/network.tf index 143e1b3c60..04b4ba2395 100644 --- a/modules/2_network/network.tf +++ b/modules/2_network/network.tf @@ -126,8 +126,8 @@ locals { sriov = <