-
Notifications
You must be signed in to change notification settings - Fork 4k
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): The following parameters can't be updated for Fargate compute environment thrown on fresh deployment #27054
Comments
root cause, provided by an internal engineer: The CFN handler first calls Fix: don't pass this value in by default anywhere. There's a whole list of properties to which this applies, but the CDK shouldn't special-case Fargate CEs to deal with that. Instead this issue needs to be resolved at the CFN level. |
graduates the alpha module. All users of any `ManagedComputeEnvironment` who left `updateToLatestImageVersion` unspecified will see it default to `undefined` instead of `true`. *If you use `FargateComputeEnvironment`, this upgrade may cause deployment errors; destroy the Fargate CE and recreate it to resolve this, if encountered.* Related: #27054. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
graduates the alpha module. All users of any `ManagedComputeEnvironment` who left `updateToLatestImageVersion` unspecified will see it default to `undefined` instead of `true`. *If you use `FargateComputeEnvironment`, this upgrade may cause deployment errors; destroy the Fargate CE and recreate it to resolve this, if encountered.* Related: #27054. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
#27059 seems to be included in v2.96.0 release, but I'm still experiencing same error message as #27054 (comment) in v2.96.2. To bad I have not yet found a workaround for this problem. Once I get into this situation, the deploy seems to fail even when no diffs are generated. |
I still seem to be having this issue, I changed the number of maxv_cpus from 5 to 8 for the following compute environment definition:
I get this error with cdk v 2.97.0:
|
In CFn, I reproduce it when
AWSTemplateFormatVersion: '2010-09-09'
Resources:
ComputeEnvironment:
Type: AWS::Batch::ComputeEnvironment
Properties:
ComputeEnvironmentName: "issue27054"
ComputeResources:
Type: "FARGATE"
MaxvCpus: 128
SecurityGroupIds:
- sg-xxx
Subnets:
- subnet-xxx
- subnet-xxx
Type: "MANAGED" => CREATE_COMPLETE MaxvCpus: 256 => UPDATE_COMPLETE AWSTemplateFormatVersion: '2010-09-09'
Resources:
ComputeEnvironment:
Type: AWS::Batch::ComputeEnvironment
Properties:
ComputeEnvironmentName: "issue27054"
ComputeResources:
Type: "FARGATE"
MaxvCpus: 128
SecurityGroupIds:
- sg-xxx
Subnets:
- subnet-xxx
- subnet-xxx
Type: "MANAGED"
ReplaceComputeEnvironment: false => CREATE_COMPLETE MaxvCpus: 256 => UPDATE_FAILED
|
This doesn't seem to be a CFN issue, and the problem seems to be that It seems that we can work around this by passing (I'm not sure why it's from aws_cdk import (
aws_ec2 as ec2,
aws_batch as batch,
App, Stack
)
from constructs import Construct
class Issue27054Stack(Stack):
def __init__(self, scope: Construct, id: str, **kwargs) -> None:
super().__init__(scope, id, **kwargs)
vpc = ec2.Vpc(self, "VPC")
name = "issue27054"
batch.FargateComputeEnvironment(self, name,
vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS),
vpc=vpc,
maxv_cpus=128,
replace_compute_environment=True
)
app = App()
Issue27054Stack(app, "Issue27054Stack")
app.synth() => CREATE_COMPLETE maxv_cpus=256
=> UPDATE_COMPLETE |
Describe the bug
We are using Fargate compute environment and we are unable to update the max vcpus on CFN.
We get the error
Expected Behavior
Should update the maxVcpus directly
Current Behavior
Throws the error
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
V2
Framework Version
No response
Node.js Version
18.16.1
OS
Linux
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: