-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
Add 'init' option to docker_container module to support docker's --init
option
#34547
Add 'init' option to docker_container module to support docker's --init
option
#34547
Conversation
The test
|
1f864bf
to
87f682d
Compare
@suzuki-shunsuke Could you please rebase this branch ? |
87f682d
to
65fa562
Compare
65fa562
to
100f3db
Compare
@Akasurde |
init: | ||
description: | ||
- Run an init inside the container that forwards signals and reaps processes. | ||
This option requires Docker API 1.25+. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide input sanity checking against the docker API version so that if an user attempts to use init
and doesn't have a new enough version of the API, they don't get a stack trace but instead a proper ansible fail_json
message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxamillion
Thank you for your review.
I have added the validation of docker API's version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxamillion @suzuki-shunsuke The validation check wasn't enough, as init
is still passed on, which leads to an error (see #42162).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@felixfontein
Oh, I'm sorry.
I understand what is wrong by seeing #42162 (comment) .
…True #34547 (review) https://docs.docker.com/engine/reference/commandline/run/#options init option requires docker API 1.25+ .
The test
|
…nit` option (ansible#34547) * Add support for `--init` option to `docker_container` module Fixes ansible#30761 * Validate docker API's version when docker_container's init option is True ansible#34547 (review) https://docs.docker.com/engine/reference/commandline/run/#options init option requires docker API 1.25+ . * Fix failure of sanity test
…nit` option (ansible#34547) * Add support for `--init` option to `docker_container` module Fixes ansible#30761 * Validate docker API's version when docker_container's init option is True ansible#34547 (review) https://docs.docker.com/engine/reference/commandline/run/#options init option requires docker API 1.25+ . * Fix failure of sanity test
SUMMARY
Add 'init' option to docker_container module to support docker's
--init
option.This option requires Docker API 1.25+.
Fixes #30761
ISSUE TYPE
COMPONENT NAME
docker_container module's
init
optionANSIBLE VERSION