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

(batch.ManagedEc2EcsComputeEnvironment): (instance_types get a extra optimal in batch) #25562

Closed
wttat opened this issue May 12, 2023 · 6 comments
Labels
@aws-cdk/aws-batch Related to AWS Batch bug This issue is a bug. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2

Comments

@wttat
Copy link

wttat commented May 12, 2023

Describe the bug

here is my cdk code:

from aws_cdk import aws_batch_alpha as batch

af2_1GPU = batch.ManagedEc2EcsComputeEnvironment(
            self,"Alphafold2CE1GPU",
            vpc=vpc,
            minv_cpus=0,
            instance_types=[ec2.InstanceType.of(ec2.InstanceClass.P3, ec2.InstanceSize.XLARGE2)],
            launch_template=launch_template,
            security_groups=[
                sg,
            ],
            vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS)
        )

Expected Behavior

i expect that only p3.2xlarge in batch CE's Instance types

Current Behavior

However, there are both p3.2xlarge and optimal

Reproduction Steps

cdk synth

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.79.1

Framework Version

No response

Node.js Version

v14.16.1.

OS

macOS 13.3.1 (a) (22E772610a)

Language

Python

Language Version

No response

Other information

No response

@wttat wttat added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 12, 2023
@github-actions github-actions bot added the @aws-cdk/aws-batch Related to AWS Batch label May 12, 2023
@suzhoum
Copy link

suzhoum commented May 12, 2023

Same. I tried to use use_optimal_instance_classes=False to suppress the optimal option, but I got the following error

5:34:17 PM | UPDATE_FAILED        | AWS::Batch::ComputeEnvironment | agbenchtestcomputeenvironment7EDAECD2
Resource handler returned message: "null" (RequestToken: cfd95b9f-ab8b-ec3c-5c84-0b01d1a2fece, HandlerErrorCode: InternalFailure)

@suzhoum
Copy link

suzhoum commented May 12, 2023

Actually removing the stack and redeploying with the use_optimal_instance_classes=False resolved the issue.

@peterwoodworth
Copy link
Contributor

@wttat as @suzhoum mentions, the useOptimalInstanceClasses is set to true by default. Feel free to set this to false

@suzhoum What was the CDK diff on the update failure? Was it just removing optimal from the InstanceTypes property?

@peterwoodworth peterwoodworth added p2 needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels May 12, 2023
@suzhoum
Copy link

suzhoum commented May 12, 2023

@peterwoodworth I saw another issue reported #21988 so followed the advice to resolve the internal failure. I was debugging an issue related to lambda not able to perform batch:SubmitJob after upgrading to 2.79.0 from 2.69.0. I was trying to update my code to generate the exact set of CFN that was generated in 2.69.0, that's why I ended up here. I will open another issue soon.

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label May 13, 2023
@wttat
Copy link
Author

wttat commented May 14, 2023

solved, thanks

@wttat wttat closed this as completed May 14, 2023
@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-batch Related to AWS Batch bug This issue is a bug. needs-cfn This issue is waiting on changes to CloudFormation before it can be addressed. p2
Projects
None yet
Development

No branches or pull requests

3 participants