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

[2.6] docker_container: fix various idempotency problems and non-working options #46058

Closed

Conversation

felixfontein
Copy link
Contributor

SUMMARY

This is a backport of #45905 to stable-2.7. It fixes various problems with idempotency and fixes some non-working options. It also includes basic idempotency tests for all options which modify container state. This PR also integrates #45747, which adds integration tests for docker_container in the first place (@gundalow suggested on IRC to include it with the backport PRs).

Note: there will be a merge conflict once #45768 is merged (or vice versa), since code was added at the same position. I can rebase once one of the PRs has been merged.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

docker_container

ANSIBLE VERSION
2.6.4

* First round of integration tests for docker_container.

* Added regression test for ansible#45700.

* Work around dict order randomization.
@ansibot
Copy link
Contributor

ansibot commented Sep 24, 2018

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. docker module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 24, 2018
…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.
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 24, 2018
@felixfontein
Copy link
Contributor Author

6d3c0ba removes a regression test for the fix in backport PR #45768.

@ansibot ansibot removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Sep 24, 2018
@felixfontein felixfontein deleted the backport/2.6/45905-45747 branch September 24, 2018 11:52
@webknjaz webknjaz removed needs_triage Needs a first human triage before being processed. labels Sep 25, 2018
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 backport This PR does not target the devel branch. bug This issue/PR relates to a bug. cloud core_review In order to be merged, this PR must follow the core review workflow. docker module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants