Skip to content

Commit

Permalink
Fix: include missing docker log-opts in config
Browse files Browse the repository at this point in the history
The default docker config options, which specify the ``log-opts`` under
``roles/docker/vars/main.yml``, were not included in the
``docker_config`` combinations when the docker role was extracted from
the baremetal role in the Zed release. This means that
``docker_log_max_file`` and ``docker_log_max_size`` are not written into
the docker daemon.json.

The var name needs to be changed, as it can't be recursively defined
within the ``docker_config`` definition under
``roles/docker/tasks/config.yml`.

Closes-Bug: #2040105
Change-Id: I05efda2a9699336136dce8cfa99ada77b9b2a17b
  • Loading branch information
MoteHue committed Feb 8, 2024
1 parent 8a432a1 commit cff2a29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Docker log-opts are now included in the docker daemon.json config again.
This allows for ``docker_log_max_file`` and ``docker_log_max_size`` to now
be set/overidden correctly.
`LP#2044537 <https://launchpad.net/bugs/2040105>`__
2 changes: 1 addition & 1 deletion roles/docker/tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
docker_config_debug:
debug: "{{ docker_debug }}"
docker_config: >-
{{ {}
{{ default_docker_config
| combine(docker_zun_config if docker_configure_for_zun | bool and 'zun-compute' in group_names else {})
| combine(docker_config_insecure_registries if docker_registry_insecure | bool else {})
| combine(docker_config_registry_mirror if docker_registry_mirrors | length > 0 else {})
Expand Down
2 changes: 1 addition & 1 deletion roles/docker/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
docker_config:
default_docker_config:
log-opts:
max-file: "{{ docker_log_max_file }}"
max-size: "{{ docker_log_max_size }}"
Expand Down

0 comments on commit cff2a29

Please sign in to comment.