amazon-ecs-cli icon indicating copy to clipboard operation
amazon-ecs-cli copied to clipboard

ecs-cli compose: support `sysctls` parameters in docker-compose.yml

Open sekiyama58 opened this issue 6 years ago • 4 comments

Summary

Currently, ecs-cli compose ignores sysctls parameters in docker-compose.yml file. They should be mapped to the SystemControls parameters in a task definition.

Description

  • Which specific command was run?
  ecs-cli compose \
    --file docker-compose.yml --ecs-params ecs-params.yml \
    --project-name ${PROJECT_NAME} create
  • Which version of the CLI you are using? (Run: ecs-cli --version) ecs-cli version 1.12.1 (e70f1b1)
  • What platform are you using to run ECS CLI commands? (E.g. Linux, MacOSX, Windows) Linux

Config files

  • docker-compose.yml
version: '3'
services:
  mysql:
    image: mysql:latest
    sysctls:
        net.core.somaxconn: 1024

Expected Behavior

Sysctls parameters are mapped to the SystemControls parameters in a task definition, e.g.:

...
    "systemControls": [{
         "namespace":"net.core.somaxconn",
         "value":"1024"
    }]
...

Observed Behavior

SystemControls parameters are ignored.

...
      "systemControls": null,
...

sekiyama58 avatar Jan 18 '19 09:01 sekiyama58

Maybe vendor/github.comdocker/cli is needed to be updated to read sysctls: https://github.com/docker/cli/blob/master/cli/compose/types/types.go#L203

sekiyama58 avatar Jan 18 '19 13:01 sekiyama58

Thanks for opening this issue @sekiyama58! SystemControls was something recently added to an ECS Task definition, and we are working on adding support for this so stay tuned!

SoManyHs avatar Jan 18 '19 23:01 SoManyHs

I've also configured

"privileged": true, 
 "systemControls": [{
         "namespace":"net.core.somaxconn",
         "value":"1024"
    }]

in Dockerrun.aws.json, deployed app on Elastic Beanstalk (multi-container type app ) and I see

...
      "systemControls": null,
...

in the task definition. So I don't think it is CLI specific but more ECS specific. It would be super to have these options available through configuration though.

zzart avatar Jan 30 '19 15:01 zzart

@SoManyHs

I've run into this issue myself and it appears that it is still not being mapped. Wondering if there has been any progress after 3 years?

DrPersico avatar Jun 03 '22 10:06 DrPersico