amazon-vpc-cni-k8s icon indicating copy to clipboard operation
amazon-vpc-cni-k8s copied to clipboard

make generate-limits script failed due to ENI limit mismatch

Open ytsssun opened this issue 1 year ago • 1 comments
trafficstars

What happened: I am getting error when running make generate-limits.

A previous region has different limits for instanceType=c6in.32xlarge than region=ap-south-1

Attach logs

Full log:

{"level":"info","ts":"2024-05-03T22:24:57.229Z","caller":"/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:51","msg":"Describing instance types in region=ap-northeast-1"}
{"level":"info","ts":"2024-05-03T22:25:00.001Z","caller":"/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:51","msg":"Describing instance types in region=ap-northeast-2"}
{"level":"info","ts":"2024-05-03T22:25:01.684Z","caller":"/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:51","msg":"Describing instance types in region=ap-northeast-3"}
{"level":"info","ts":"2024-05-03T22:25:02.829Z","caller":"/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:51","msg":"Describing instance types in region=ap-south-1"}
{"level":"fatal","ts":"2024-05-03T22:25:04.973Z","caller":"/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:51","msg":"A previous region has different limits for instanceType=c6in.32xlarge than region=ap-south-1","stacktrace":"github.com/aws/amazon-vpc-cni-k8s/pkg/utils/logger.(*structuredLogger).Fatalf\n\t/home/ec2-user/amazon-vpc-cni-k8s/pkg/utils/logger/zaplogger.go:83\nmain.describeInstanceTypes\n\t/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:178\nmain.main\n\t/home/ec2-user/amazon-vpc-cni-k8s/scripts/gen_vpc_ip_limits.go:51\nruntime.main\n\t/usr/lib/golang/src/runtime/proc.go:250"}
exit status 1

What you expected to happen: Expect the script to run successfully and generate the eni-max-pods.txt.

How to reproduce it (as minimally and precisely as possible): Can be easily reproduced by running the make generate-limits command.

Anything else we need to know?: This is currently blocking Bottlerocket 1.20.0 release (https://github.com/bottlerocket-os/bottlerocket/issues/3942)

Environment:

  • Kubernetes version (use kubectl version): N/A
  • CNI Version: N/A
  • OS (e.g: cat /etc/os-release): N/A
  • Kernel (e.g. uname -a): N/A

ytsssun avatar May 03 '24 23:05 ytsssun

This report looks like the instance c6in.32xlarge does have the same maxENI value depending on the region, which is very strange.

The error being thrown is intentional to capture these issues, and it was introduced in this PR https://github.com/aws/amazon-vpc-cni-k8s/pull/1846/files

orsenthil avatar May 03 '24 23:05 orsenthil

Issue is resolved, I was able to generate a eni-max-pods file today. Looks like root cause is not with the script. Thanks!

ytsssun avatar May 07 '24 17:05 ytsssun

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one.

github-actions[bot] avatar May 07 '24 17:05 github-actions[bot]