Skip to content

Commit

Permalink
Merge branch 'main' into sumanth/validate-upload-result
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanthreddy29 authored Oct 15, 2024
2 parents 5ff2271 + 556ea25 commit 226b0c5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
26 changes: 26 additions & 0 deletions modules/terraform/aws/virtual-network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,32 @@ resource "aws_subnet" "subnets" {
tags = merge(local.tags, {
"Name" = each.value.name
})

provisioner "local-exec" {
/*
This command cleans up any not in use ENIs attached to this subnet, which were created outside the scope of the Terraform modules.
This is a workaround for the known VPC CNI addon's "leaked ENIs" issue: See https://github.com/aws/amazon-vpc-cni-k8s/issues/608
*/
when = destroy
command = <<-EOT
echo "Detaching Subnet: ${self.id} Network Interfaces"
# Get available (not in use) ENIs attached to this subnet
network_interfaces_attachment_ids=$(aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=${self.id} --query "NetworkInterfaces[?Status=='available' && Attachment.AttachIndex != '0'].Attachment.AttachmentId" --output text)
for network_interface_attachment_id in $network_interfaces_attachment_ids; do
echo "Detaching available Network Interface attachment id: $network_interface_attachment_id"
if ! aws ec2 detach-network-interface --attachment-id $network_interface_attachment_id; then
echo "##[warning] Failed to detach Network Interface attachment id: $network_interface_attachment_id"
fi
done
network_interfaces=$(aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=${self.id} --query "NetworkInterfaces[?Status=='available' && Attachment.AttachIndex != '0'].NetworkInterfaceId" --output text)
for network_interface in $network_interfaces; do
echo "Deleting available Network Interface: $network_interface"
if ! aws ec2 delete-network-interface --network-interface-id $network_interface; then
echo "##[warning] Failed to delete Network Interface: $network_interface"
fi
done
EOT
}
}

resource "aws_eip" "eips" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ stages:
extra_benchmark_subcmd_args: ""
disable_warmup: "true"
engine_input:
runner_image: telescope.azurecr.io/oss/kperf:v0.1.3
runner_image: telescope.azurecr.io/oss/kperf:v0.1.5
benchmark_subcmd: node10_job1_pod100
benchmark_subcmd_args: "--total 1000"
max_parallel: 2
Expand All @@ -58,7 +58,7 @@ stages:
flowcontrol: "exempt:5"
extra_benchmark_subcmd_args: ""
engine_input:
runner_image: telescope.azurecr.io/oss/kperf:v0.1.3
runner_image: telescope.azurecr.io/oss/kperf:v0.1.5
benchmark_subcmd: node10_job1_pod100
benchmark_subcmd_args: "--total 1000"
max_parallel: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stages:
flowcontrol: "exempt:5"
extra_benchmark_subcmd_args: "--padding-bytes=16384"
engine_input:
runner_image: telescope.azurecr.io/oss/kperf:v0.1.2
runner_image: telescope.azurecr.io/oss/kperf:v0.1.5
benchmark_subcmd: node100_pod10k
benchmark_subcmd_args: "--total 72000 --deployments=10 --interval 24h --cpu 64 --memory 192"
max_parallel: 2
Expand Down Expand Up @@ -68,7 +68,7 @@ stages:
flowcontrol: "exempt:5"
extra_benchmark_subcmd_args: "--padding-bytes=16384"
engine_input:
runner_image: telescope.azurecr.io/oss/kperf:v0.1.2
runner_image: telescope.azurecr.io/oss/kperf:v0.1.5
benchmark_subcmd: node100_pod10k
benchmark_subcmd_args: "--total 72000 --deployments=10 --interval 24h --cpu 64 --memory 192"
max_parallel: 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ stages:
flowcontrol: "exempt:5"
extra_benchmark_subcmd_args: ""
engine_input:
runner_image: telescope.azurecr.io/oss/kperf:v0.0.8
runner_image: telescope.azurecr.io/oss/kperf:v0.1.5
benchmark_subcmd: node100_job1_pod3k
benchmark_subcmd_args: "--total 36000"
max_parallel: 2
Expand All @@ -56,7 +56,7 @@ stages:
flowcontrol: "exempt:5"
extra_benchmark_subcmd_args: ""
engine_input:
runner_image: telescope.azurecr.io/oss/kperf:v0.0.8
runner_image: telescope.azurecr.io/oss/kperf:v0.1.5
benchmark_subcmd: node100_job1_pod3k
benchmark_subcmd_args: "--total 36000"
max_parallel: 2
Expand Down

0 comments on commit 226b0c5

Please sign in to comment.