-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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-batch: Unable to create Windows Fargate Job Definition due to invalid generated CF Template #29140
Comments
Thank you for the report and we'll review @msambol 's PR to move this forward. |
In the meantime, we can patch the generated CloudFormation template.
|
Yup, that works, and it's better than editing the compiled JS code, as I was doing, thanks! |
Here's from the k8s docs: ``` securityContext.readOnlyRootFilesystem - not possible on Windows; write access is required for registry & system processes to run inside the container ``` Closes #29140. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Here's from the k8s docs: ``` securityContext.readOnlyRootFilesystem - not possible on Windows; write access is required for registry & system processes to run inside the container ``` Closes aws#29140. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Describe the bug
When trying to create an EcsJobDefinitionInstance, using a container of type EcsFargateContainerDefinition, with fargateCpuArchitecture=X86_64 and fargateOperatingSystemFamily=WINDOWS_SERVER_2019_FULL (but it also happens with any of the valid WINDOWS options too), I get the following error (after executing
npx cdk deploy --all
):AWS::Batch::JobDefinition | WindowsJobDefinition (WindowsJobDefinition4BE72269) An error occurred (ClientException) when calling the RegisterJobDefinition operation: Error executing request, Exception : ReadonlyRootFilesystem parameter is not supported for Windows containers, RequestId: 2432267b-cacf-403e-9a70-1f7d565e814d
Expected Behavior
A new JobDefinition is created successfuly
Current Behavior
AWS::Batch::JobDefinition | WindowsJobDefinition (WindowsJobDefinition4BE72269) An error occurred (ClientException) when calling the RegisterJobDefinition operation: Error executing request, Exception : ReadonlyRootFilesystem parameter is not supported for Windows containers, RequestId: 2432267b-cacf-403e-9a70-1f7d565e814d
Reproduction Steps
Possible Solution
The generated CloudFormation template looks like this:
It can be seen that it has an
"ReadonlyRootFilesystem": false,
attribute. I imagine in the case of Windows containers, that attribute should not be present at all.Additional Information/Context
Trying to build a Linux Job Definition works just fine, with all the same parameters (all but the operatingSystemFamily and the docker image name).
The issue also happens with all the previous CDK versions that include support for specifying the OS family (2.125.0, 2.126.0, 2.127.0)
CDK CLI Version
2.128.0
Framework Version
2.128.0
Node.js Version
v18.19.0
OS
Microsoft Windows [Version 10.0.19045.3930]
Language
TypeScript
Language Version
5.3.3
Other information
No response
The text was updated successfully, but these errors were encountered: