aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fdio.infra.terraform/2n_aws_c5n/variables.tf2
-rw-r--r--fdio.infra.terraform/3n_aws_c5n/deploy/main.tf6
-rw-r--r--fdio.infra.terraform/3n_aws_c5n/variables.tf2
-rw-r--r--resources/libraries/bash/function/common.sh1
-rw-r--r--resources/libraries/bash/function/terraform.sh3
5 files changed, 9 insertions, 5 deletions
diff --git a/fdio.infra.terraform/2n_aws_c5n/variables.tf b/fdio.infra.terraform/2n_aws_c5n/variables.tf
index 93e4d29a89..4854978c7b 100644
--- a/fdio.infra.terraform/2n_aws_c5n/variables.tf
+++ b/fdio.infra.terraform/2n_aws_c5n/variables.tf
@@ -39,7 +39,7 @@ variable "instance_initiated_shutdown_behavior" {
variable "instance_type" {
description = "AWS instance type"
type = string
- default = "c5n.9xlarge"
+ default = "c5n.4xlarge"
}
variable "testbed_name" {
diff --git a/fdio.infra.terraform/3n_aws_c5n/deploy/main.tf b/fdio.infra.terraform/3n_aws_c5n/deploy/main.tf
index 917dd97232..dd994cce0c 100644
--- a/fdio.infra.terraform/3n_aws_c5n/deploy/main.tf
+++ b/fdio.infra.terraform/3n_aws_c5n/deploy/main.tf
@@ -223,15 +223,15 @@ resource "aws_network_interface" "dut2_if1" {
aws_subnet.c,
aws_instance.dut2
]
- private_ip = var.dut2_if2_ip
- private_ips = [var.dut2_if2_ip]
+ private_ip = var.dut2_if1_ip
+ private_ips = [var.dut2_if1_ip]
security_groups = [aws_security_group.CSITSG.id]
source_dest_check = false
subnet_id = aws_subnet.c.id
attachment {
instance = aws_instance.dut2.id
- device_index = 2
+ device_index = 1
}
tags = {
diff --git a/fdio.infra.terraform/3n_aws_c5n/variables.tf b/fdio.infra.terraform/3n_aws_c5n/variables.tf
index 80f2829f22..299b3c250b 100644
--- a/fdio.infra.terraform/3n_aws_c5n/variables.tf
+++ b/fdio.infra.terraform/3n_aws_c5n/variables.tf
@@ -39,7 +39,7 @@ variable "instance_initiated_shutdown_behavior" {
variable "instance_type" {
description = "AWS instance type"
type = string
- default = "c5n.9xlarge"
+ default = "c5n.4xlarge"
}
variable "testbed_name" {
diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh
index 510ccb0072..7348f25c47 100644
--- a/resources/libraries/bash/function/common.sh
+++ b/resources/libraries/bash/function/common.sh
@@ -1122,6 +1122,7 @@ function set_environment_variables () {
# T-Rex 2.88 workaround for ENA NICs
export TREX_RX_DESCRIPTORS_COUNT=1024
export TREX_EXTRA_CMDLINE="--mbuf-factor 19"
+ export TREX_CORE_COUNT=6
# Settings to prevent duration stretching
export PERF_TRIAL_STL_DELAY=0.1
;;
diff --git a/resources/libraries/bash/function/terraform.sh b/resources/libraries/bash/function/terraform.sh
index 5313b62545..ed3bda32aa 100644
--- a/resources/libraries/bash/function/terraform.sh
+++ b/resources/libraries/bash/function/terraform.sh
@@ -34,6 +34,9 @@ function terraform_apply () {
pushd "${CSIT_DIR}"/fdio.infra.terraform || die "Pushd failed!"
pushd "${NODENESS}_${FLAVOR}_c5n" || die "Pushd failed!"
export TF_LOG=INFO
+ trap 'terraform_destroy' ERR || {
+ die "Trap attempt failed, please cleanup manually. Aborting!"
+ }
terraform apply -no-color -auto-approve || die "Terraform apply failed!"
popd || die "Popd failed!"
popd || die "Popd failed!"