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

Error response from daemon when using windows memory unbounded workaround #2344

Closed
McDoit opened this issue Jan 20, 2020 · 4 comments
Closed

Comments

@McDoit
Copy link

McDoit commented Jan 20, 2020

Summary

Running with ECS_ENABLE_MEMORY_UNBOUNDED_WINDOWS_WORKAROUND returns CannotCreateContainerError: Error response from daemon: invalid option: Windows does not support MemoryReservation

Description

When trying to run ECS_ENABLE_MEMORY_UNBOUNDED_WINDOWS_WORKAROUND on our windows cluster with agent version 1.34.0 (latest?) i get the following error from the ECS console:

CannotCreateContainerError: Error response from daemon: invalid option: Windows does not support MemoryReservation

Is this fixed yet, or is this related issue closed anyway?
#1144

Expected Behavior

Able to start a task with containers running only memory reserved

Observed Behavior

Not able to start task

Environment Details

Windows Server 2019 ECS AMI
Agent version 1.34.0
Docker version 19.03.5

Supporting Log Snippets

@fenxiong
Copy link
Contributor

Hi @McDoit ,
This is supposed to be fixed in the agent version you use. What do you mean by Running with ECS_ENABLE_MEMORY_UNBOUNDED_WINDOWS_WORKAROUND? Did you set it to true or false? If you set it to true, and don't specify the Memory field in the container definition, you shouldn't be getting this error.

@McDoit
Copy link
Author

McDoit commented Jan 21, 2020

Yeah i did set it to true, but i also set both MemoryReservation and Memory , isnt that combination supported?

@fenxiong
Copy link
Contributor

fenxiong commented Jan 22, 2020

Yeah i did set it to true, but i also set both MemoryReservation and Memory , isnt that combination supported?

We don't disallow you from creating a task definition that specifies these, but memory limit is not working on Windows until Docker on Windows supports it. (I think the comments in this issue have more context on the problem of container memory limit on Windows)

As per documented in the README for ECS_ENABLE_MEMORY_UNBOUNDED_WINDOWS_WORKAROUND - To run a memory unbounded task, omit the memory hard limit and set any memory reservation, it will be ignored. So we skip setting the MemoryReservation field when running container (which is necessary to avoid the error you have since Docker on Windows doesn't support this field) only if you don't specify a value for the Memory field. If you have a value for Memory, the ECS_ENABLE_MEMORY_UNBOUNDED_WINDOWS_WORKAROUND config doesn't take effect.

@McDoit
Copy link
Author

McDoit commented Jan 31, 2020

Ok, thank you for the clarification
I added the Memory field to future proof the config a bit, in the case of working Memory/MemoryReservation on Windows in the future
But then i will just remove it, thank you again

@McDoit McDoit closed this as completed Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants