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

docker_swarm_service: add support for sysctl parameter #190

Closed
lem8r opened this issue Aug 15, 2021 · 8 comments
Closed

docker_swarm_service: add support for sysctl parameter #190

lem8r opened this issue Aug 15, 2021 · 8 comments
Assignees
Labels
docker-swarm Docker Swarm enhancement New feature or request

Comments

@lem8r
Copy link

lem8r commented Aug 15, 2021

SUMMARY

Since Docker API 1.40 there is sysctl parameter for swarm services.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

docker_swarm_service

ADDITIONAL INFORMATION

In some cases there is a need to configure service's sysctl parameters. In my case it is net.ipv4.tcp_keepalive_* for database service. To prevent closing TCP socket on long running requests.

It looks like so when starting from command line

docker service create \
my_service \
--sysctl net.ipv4.tcp_keepalive_time=600 \
--sysctl net.ipv4.tcp_keepalive_intvl=60 \
--sysctl net.ipv4.tcp_keepalive_probes=6 \
image:1.0
@felixfontein felixfontein added docker-swarm Docker Swarm enhancement New feature or request labels Aug 15, 2021
@WojciechowskiPiotr
Copy link
Collaborator

I think it is a good feature proposal. Will implement it in September.

@WojciechowskiPiotr WojciechowskiPiotr self-assigned this Aug 28, 2021
@Ranger-X
Copy link

September is over :-)
Is there any news on this feature request?

@lem8r
Copy link
Author

lem8r commented Oct 15, 2021

Year of September was not specified 🤷‍♂️

@WojciechowskiPiotr
Copy link
Collaborator

Hey. Sorry guys for the delay. I was overloaded with work lately, but I'm almost back to a normal level of work. Will take a look at it soon.

@WojciechowskiPiotr
Copy link
Collaborator

After further investigation, I found that sysctl is not implemented in https://github.com/docker/docker-py yet. This needs to be added there first so we can use it in the Ansible module.

I opened a request for this feature docker/docker-py#2907

@NairolfL
Copy link
Contributor

Hello,
It seems that they implemented it a while ago now : docker/docker-py#3029
Would it be possible to add the parameter to docker_swarm_service ?

Thanks

@NairolfL
Copy link
Contributor

NairolfL commented May 2, 2024

#836 was merged, I think this can be closed :)

@lem8r
Copy link
Author

lem8r commented May 2, 2024

@NairolfL Thank you!

@lem8r lem8r closed this as completed May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker-swarm Docker Swarm enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants