-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Fixes #19103 - Set Volumes field only for anonymous volumes #19105
Conversation
…nonymous volumes Currently docker_container module sets `Volumes` field for all volumes passed. This behavior is inconsistent with `docker run` command. This commit fixes `docker_container.py` to set `Volumes` field only when anonymous volumes are passed. Fixes ansible#4974
Migrated from ansible/ansible-modules-core#5848 |
Hey @jimi-c , not sure if there's an active maintainer for this. Should we be pinging someone in particular to take a look at this? Thanks! |
Hey @jimi-c , congrats on the Ansible 2.3 release! I'm re-ping'ing you on this pull request given your comments on https://news.ycombinator.com/item?id=14100434 Given this has been open for 4 months, and it's not a new module (it's a bug fix), I think the issue that's unique here is that there isn't really an active maintainer for Docker-related Ansible changes. Thoughts? Thanks! |
Testing this. It seems your change is causing the module to no longer be idempotent. It returns the following differences:
Here's my playbook:
|
I think the _get_expected_volumes method at line 1552 should look something like this:
|
needs_revision |
@rsanr are you still around? Can you rebase this PR? |
Hi,
If you're the PR author, and you want to start the conversation back up, please:
If you're a community member, and you want to see this change merged, please:
If you've like to help with the Docker modules please comment on the Docker Agenda/Task List How to rebase a branch: https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html needs_info |
@rsanr This pullrequest is waiting for your response. Please respond or the pullrequest will be closed. |
ISSUE TYPE
COMPONENT NAME
docker_container
ANSIBLE VERSION
SUMMARY
Currently docker_container module sets
Volumes
field for all volumes passed. This behavior is inconsistent withdocker run
command. This commit fixesdocker_container.py
to setVolumes
field only when anonymous volumes are passed.This behavior is also clarified in the following comment:
moby/moby#2949 (comment)
Playbook:
Before:
After:
Fixes #19103