Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(aws_eks): (COMPUTE7_GRAVITON3 picks wrong AMI) #20758

Closed
dborysenko opened this issue Jun 15, 2022 · 4 comments
Closed

(aws_eks): (COMPUTE7_GRAVITON3 picks wrong AMI) #20758

dborysenko opened this issue Jun 15, 2022 · 4 comments
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1

Comments

@dborysenko
Copy link

Describe the bug

Below code picks X86_64 AMI for ARM AutoScaling group.

cluster.add_auto_scaling_group_capacity(
        "dmzASG",
        instance_type=ec2.InstanceType.of(ec2.InstanceClass.COMPUTE7_GRAVITON3,
                                          ec2.InstanceSize.XLARGE8),
        block_devices=[
            autoscaling.BlockDevice(device_name='/dev/xvda',
                                    volume=autoscaling.BlockDeviceVolume.ebs(
                                        50, encrypted=True))
        ],
        min_capacity=1,
        max_capacity=100,
        vpc_subnets=ec2.SubnetSelection(subnets=dmz_subnet_list)
)

Expected Behavior

Expect 1 EC2 instance of type "c7g.8xlarge" to be created.

Current Behavior

0 instances created. AutoScailing group Activity tab reports below error:
Launching a new EC2 instance. Status Reason: The architecture 'arm64' of the specified instance type does not match the architecture 'x86_64' of the specified AMI. Specify an instance type and an AMI that have matching architectures, and try again. You can use 'describe-instance-types' or 'describe-images' to discover the architecture of the instance type or AMI. Launching EC2 instance failed.

Reproduction Steps

try to add asg capacity to eks cluster:

cluster.add_auto_scaling_group_capacity(
        "dmzASG",
        instance_type=ec2.InstanceType.of(ec2.InstanceClass.COMPUTE7_GRAVITON3,
                                          ec2.InstanceSize.XLARGE8),
        block_devices=[
            autoscaling.BlockDevice(device_name='/dev/xvda',
                                    volume=autoscaling.BlockDeviceVolume.ebs(
                                        50, encrypted=True))
        ],
        min_capacity=1,
        max_capacity=100,
        vpc_subnets=ec2.SubnetSelection(subnets=dmz_subnet_list)
)

Possible Solution

Switching InstanceClass to COMPUTE6_GRAVITON2 "resolves" the issue:

cluster.add_auto_scaling_group_capacity(
        "dmzASG",
        instance_type=ec2.InstanceType.of(ec2.InstanceClass. COMPUTE6_GRAVITON2,
                                          ec2.InstanceSize.XLARGE8),
        block_devices=[
            autoscaling.BlockDevice(device_name='/dev/xvda',
                                    volume=autoscaling.BlockDeviceVolume.ebs(
                                        50, encrypted=True))
        ],
        min_capacity=1,
        max_capacity=100,
        vpc_subnets=ec2.SubnetSelection(subnets=dmz_subnet_list)
)

Additional Information/Context

No response

CDK CLI Version

2.28.0 (build ba233f0)

Framework Version

No response

Node.js Version

v16.15.0

OS

MacOS 12.4

Language

Python

Language Version

Python 3.9.12

Other information

No response

@dborysenko dborysenko added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jun 15, 2022
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Jun 15, 2022
@gergnz
Copy link
Contributor

gergnz commented Jun 16, 2022

As soon as I can get my integration tests working this should be fixed in #20543

@peterwoodworth peterwoodworth added p1 effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 16, 2022
@peterwoodworth
Copy link
Contributor

Thanks for getting to this @gergnz!

@dborysenko
Copy link
Author

Issue is resolved in cdk 2.29.0
Thank you. Closing.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

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.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. effort/small Small work item – less than a day of effort in-progress This issue is being actively worked on. p1
Projects
None yet
Development

No branches or pull requests

4 participants