Skip to content

Commit

Permalink
docker_container: fix various idempotency problems and non-working op…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
felixfontein committed Sep 24, 2018
1 parent dfdc82e commit 8814ff3
Show file tree
Hide file tree
Showing 2 changed files with 213 additions and 83 deletions.
7 changes: 7 additions & 0 deletions changelogs/fragments/docker_container-idempotency.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
bugfixes:
- "docker_container - Makes ``blkio_weight``, ``cpuset_mems``, ``dns_opts`` and ``uts`` options actually work."
- "docker_container - Fix idempotency problems with ``cap_drop`` and ``groups`` (when numeric group IDs were used)."
- "docker_container - Fix type conversion errors for ``log_options``."
- "docker_container - Fixing various comparison/idempotency problems related to wrong comparisons.
In particular, comparisons for ``command`` and ``entrypoint`` (both lists) no longer ignore missing
elements during idempotency checks."

0 comments on commit 8814ff3

Please sign in to comment.