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

allow unbounded ram tasks windows #2239

Merged
merged 3 commits into from
Oct 20, 2019

Conversation

adnxn
Copy link
Contributor

@adnxn adnxn commented Oct 16, 2019

Summary

carrying over #2142 and testing. see #1144 and #2142 for context.

Implementation details

Testing

New tests cover the changes:

Description for the changelog

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@adnxn adnxn changed the title Coveord allow unbounded ram tasks windows allow unbounded ram tasks windows Oct 16, 2019
@adnxn adnxn requested review from petderek and fenxiong October 16, 2019 23:09
@adnxn adnxn force-pushed the coveord-allow-unbounded-ram-tasks-windows branch from cd42477 to d0eedb0 Compare October 17, 2019 00:44
@adnxn adnxn requested a review from sharanyad October 17, 2019 10:35
README.md Outdated
@@ -170,6 +170,7 @@ additional details on each available environment variable.
| `ECS_CGROUP_PATH` | `/sys/fs/cgroup` | The root cgroup path that is expected by the ECS agent. This is the path that accessible from the agent mount. | `/sys/fs/cgroup` | Not applicable |
| `ECS_CGROUP_CPU_PERIOD` | `10ms` | CGroups CPU period for task level limits. This value should be between 8ms to 100ms | `100ms` | Not applicable |
| `ECS_ENABLE_CPU_UNBOUNDED_WINDOWS_WORKAROUND` | `true` | When `true`, ECS will allow CPU unbounded(CPU=`0`) tasks to run along with CPU bounded tasks in Windows. | Not applicable | `false` |
| `ECS_ENABLE_RAM_UNBOUNDED_WINDOWS_WORKAROUND` | `true` | When `true`, ECS will allow tasks with no memory reservation to run along with memory bounded tasks in Windows. To run a memory unbounded task, omit the memory hard limit and set any memory reservation, it will be ignored. | Not applicable | `false` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what would be a good counterpoint for calling this ECS_ENABLE_MEMORY_UNBOUNDED_WINDOWS_WORKAROUND ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/allow tasks with no memory reservation/ignore the memory reservation parameter (soft limit)/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im okay with this


// With RamUnbounded set to false, MemoryReservation is not overridden
config, configErr := testTask.DockerHostConfig(testTask.Containers[0], dockerMap(testTask), defaultDockerClientAPIVersion)
if configErr != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be assert. same below

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use require.NoError(t, err) if you want the exit behavior you get from t.fatal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -118,8 +119,10 @@ func (cfg *Config) platformOverrides() {
cfg.TaskCPUMemLimit = ExplicitlyDisabled

cpuUnbounded := utils.ParseBool(os.Getenv("ECS_ENABLE_CPU_UNBOUNDED_WINDOWS_WORKAROUND"), false)
ramUnbounded := utils.ParseBool(os.Getenv("ECS_ENABLE_RAM_UNBOUNDED_WINDOWS_WORKAROUND"), false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these need unit tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added tests to check default config

@adnxn adnxn force-pushed the coveord-allow-unbounded-ram-tasks-windows branch 2 times, most recently from b4d1504 to 2dbca13 Compare October 18, 2019 16:54
rename the unbounded memory config for windows and add update unit tests
@adnxn adnxn force-pushed the coveord-allow-unbounded-ram-tasks-windows branch from 2dbca13 to 541f0d5 Compare October 19, 2019 13:59
adnxn added a commit that referenced this pull request Oct 20, 2019
@adnxn adnxn merged commit 541f0d5 into aws:dev Oct 20, 2019
@adnxn adnxn added this to the 1.33.0 milestone Oct 23, 2019
@shubham2892 shubham2892 modified the milestones: 1.33.0, 1.32.1 Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants