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_container: fix various idempotency problems and non-working options #45905
docker_container: fix various idempotency problems and non-working options #45905
Conversation
bot_status |
Componentschangelogs/fragments/docker_container-idempotency.yaml lib/ansible/modules/cloud/docker/docker_container.py test/integration/targets/docker_container/files/env-file test/integration/targets/docker_container/tasks/main.yml test/integration/targets/docker_container/tasks/tests/options.yml test/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml test/integration/targets/docker_container/tasks/tests/start-stop.yml Metadatawaiting_on: ansible |
c63a702
to
69c4e83
Compare
…ext-sensitive way. This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``).
69c4e83
to
4c941b1
Compare
bot_status |
Componentschangelogs/fragments/docker_container-idempotency.yaml lib/ansible/modules/cloud/docker/docker_container.py test/integration/targets/docker_container/files/env-file test/integration/targets/docker_container/tasks/main.yml test/integration/targets/docker_container/tasks/tests/options.yml test/integration/targets/docker_container/tasks/tests/regression-45700-dont-parse-on-absent.yml test/integration/targets/docker_container/tasks/tests/start-stop.yml Metadatawaiting_on: ansible |
@kassiansun Sorry, I had to add something more to avoid the use of not-yet-existing parameters for older docker-py versions. |
dabf48c
to
2c8c987
Compare
@kassiansun Can you add another shipit? :) This week there should be another 2.6.x release (the previous one was three weeks ago), it would be nice if we can get this in there. |
Thanks all for reviewing and merging! :) |
…tions (ansible#45905) * Sorting args. * Doing comparisons of options with container parameters in a more context-sensitive way. This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``). * Make blkio_weight work. * Fix cap_drop idempotency problem. * Making groups idempotent if it contains integers. * Make cpuset_mems work. * Make dns_opts work. * Fixing log_opts: docker expects string values, returns error for integer. * Adding tests from felixfontein/ansible-docker_container-test#2. * Make uts work. * Adding changelog entry. * Forgot option security_opts. * Fixing typo. * Explain strict set(dict) comparison a bit more. * Improving idempotency tests. * Making dns_servers a list, since the ordering is relevant. * Making dns_search_domains a list, since the ordering is relevant. * Improving dns_search_domains/dns_servers. * Fixing entrypoint test. * Making sure options are only supported for correct docker-py versions.
…tions (ansible#45905) * Sorting args. * Doing comparisons of options with container parameters in a more context-sensitive way. This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``). * Make blkio_weight work. * Fix cap_drop idempotency problem. * Making groups idempotent if it contains integers. * Make cpuset_mems work. * Make dns_opts work. * Fixing log_opts: docker expects string values, returns error for integer. * Adding tests from felixfontein/ansible-docker_container-test#2. * Make uts work. * Adding changelog entry. * Forgot option security_opts. * Fixing typo. * Explain strict set(dict) comparison a bit more. * Improving idempotency tests. * Making dns_servers a list, since the ordering is relevant. * Making dns_search_domains a list, since the ordering is relevant. * Improving dns_search_domains/dns_servers. * Fixing entrypoint test. * Making sure options are only supported for correct docker-py versions.
…tions (#45905) * Sorting args. * Doing comparisons of options with container parameters in a more context-sensitive way. This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``). * Make blkio_weight work. * Fix cap_drop idempotency problem. * Making groups idempotent if it contains integers. * Make cpuset_mems work. * Make dns_opts work. * Fixing log_opts: docker expects string values, returns error for integer. * Adding tests from felixfontein/ansible-docker_container-test#2. * Make uts work. * Adding changelog entry. * Forgot option security_opts. * Fixing typo. * Explain strict set(dict) comparison a bit more. * Improving idempotency tests. * Making dns_servers a list, since the ordering is relevant. * Making dns_search_domains a list, since the ordering is relevant. * Improving dns_search_domains/dns_servers. * Fixing entrypoint test. * Making sure options are only supported for correct docker-py versions.
…tions (ansible#45905) * Sorting args. * Doing comparisons of options with container parameters in a more context-sensitive way. This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``). * Make blkio_weight work. * Fix cap_drop idempotency problem. * Making groups idempotent if it contains integers. * Make cpuset_mems work. * Make dns_opts work. * Fixing log_opts: docker expects string values, returns error for integer. * Adding tests from felixfontein/ansible-docker_container-test#2. * Make uts work. * Adding changelog entry. * Forgot option security_opts. * Fixing typo. * Explain strict set(dict) comparison a bit more. * Improving idempotency tests. * Making dns_servers a list, since the ordering is relevant. * Making dns_search_domains a list, since the ordering is relevant. * Improving dns_search_domains/dns_servers. * Fixing entrypoint test. * Making sure options are only supported for correct docker-py versions.
…tions (#45905) * Sorting args. * Doing comparisons of options with container parameters in a more context-sensitive way. This prevents unnecessary restarts, or missing restarts (f.ex. if parameters are removed from ``cmd``). * Make blkio_weight work. * Fix cap_drop idempotency problem. * Making groups idempotent if it contains integers. * Make cpuset_mems work. * Make dns_opts work. * Fixing log_opts: docker expects string values, returns error for integer. * Adding tests from felixfontein/ansible-docker_container-test#2. * Make uts work. * Adding changelog entry. * Forgot option security_opts. * Fixing typo. * Explain strict set(dict) comparison a bit more. * Improving idempotency tests. * Making dns_servers a list, since the ordering is relevant. * Making dns_search_domains a list, since the ordering is relevant. * Improving dns_search_domains/dns_servers. * Fixing entrypoint test. * Making sure options are only supported for correct docker-py versions.
SUMMARY
This is a subset of fixes from #44789 which fix various problems with idempotency, and some options which apparently never worked in the first place. It also adds tests for all module options which belong to the state of the docker container.
ISSUE TYPE
COMPONENT NAME
docker_container
ANSIBLE VERSION