Docker config variable seems to be ignored

Bug #2040105 reported by Johannes But
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ansible-collection-kolla
Fix Released
Undecided
Matt Crees
kolla-ansible
Confirmed
Undecided
Matt Crees

Bug Description

In our kolla ansible deployment i noticed very big docker log sizes (50GB+) for the tgtd container. While debugging this i dug into the docker config set by the docker role and i wondered why the settings of the `docker_config` variable (https://opendev.org/openstack/ansible-collection-kolla/src/commit/4ac11fabcf7bb064cbbb21261dedc52d8dc6e952/roles/docker/vars/main.yml#L2) are not present in our daemon.json on the host.

I assume that this variable should be used in the config task: https://opendev.org/openstack/ansible-collection-kolla/src/commit/4ac11fabcf7bb064cbbb21261dedc52d8dc6e952/roles/docker/tasks/config.yml#L9-L47

But i am not absolutely sure about this.

Other related code:

- https://opendev.org/openstack/ansible-collection-kolla/src/commit/4ac11fabcf7bb064cbbb21261dedc52d8dc6e952/roles/docker/defaults/main.yml#L36-L37

Also the latest official docs states that these variables can be set: https://docs.openstack.org/kolla-ansible/latest/reference/deployment-and-bootstrapping/bootstrap-servers.html#configuration

Maybe someone can confirm this.

Revision history for this message
Matt Crees (mattcrees) wrote :

Can confirm that this is a genuine bug. It seems that when the docker config handling was extracted from the baremetal role into the docker role, combining the default values was lost.

Changed in ansible-collection-kolla:
status: New → Confirmed
Matt Crees (mattcrees)
Changed in kolla-ansible:
status: New → Confirmed
Changed in ansible-collection-kolla:
assignee: nobody → Matt Crees (mattcrees)
Changed in kolla-ansible:
assignee: nobody → Matt Crees (mattcrees)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-collection-kolla (master)
Changed in ansible-collection-kolla:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-collection-kolla (master)

Reviewed: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/907107
Committed: https://opendev.org/openstack/ansible-collection-kolla/commit/cff2a29d1c21a1d05ce97ebf1d41f846189f1547
Submitter: "Zuul (22348)"
Branch: master

commit cff2a29d1c21a1d05ce97ebf1d41f846189f1547
Author: Matt Crees <email address hidden>
Date: Mon Jan 29 17:45:54 2024 +0000

    Fix: include missing docker log-opts in config

    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

Changed in ansible-collection-kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-collection-kolla (stable/2023.2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-collection-kolla (stable/2023.1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-collection-kolla (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-collection-kolla (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/909254
Committed: https://opendev.org/openstack/ansible-collection-kolla/commit/533e73925cdaabf8d37be20d91e41b6941dcf08a
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 533e73925cdaabf8d37be20d91e41b6941dcf08a
Author: Matt Crees <email address hidden>
Date: Mon Jan 29 17:45:54 2024 +0000

    Fix: include missing docker log-opts in config

    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
    (cherry picked from commit cff2a29d1c21a1d05ce97ebf1d41f846189f1547)

tags: added: in-stable-zed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-collection-kolla (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/909253
Committed: https://opendev.org/openstack/ansible-collection-kolla/commit/13198717020f94c665eee86fc27b27b2d313d8cc
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 13198717020f94c665eee86fc27b27b2d313d8cc
Author: Matt Crees <email address hidden>
Date: Mon Jan 29 17:45:54 2024 +0000

    Fix: include missing docker log-opts in config

    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
    (cherry picked from commit cff2a29d1c21a1d05ce97ebf1d41f846189f1547)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-collection-kolla (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/909252
Committed: https://opendev.org/openstack/ansible-collection-kolla/commit/a0ff355bb2dfeac70a5e69ac4eae02be6575d40e
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit a0ff355bb2dfeac70a5e69ac4eae02be6575d40e
Author: Matt Crees <email address hidden>
Date: Mon Jan 29 17:45:54 2024 +0000

    Fix: include missing docker log-opts in config

    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
    (cherry picked from commit cff2a29d1c21a1d05ce97ebf1d41f846189f1547)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ansible-collection-kolla 3.2.0

This issue was fixed in the openstack/ansible-collection-kolla 3.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ansible-collection-kolla 4.1.0

This issue was fixed in the openstack/ansible-collection-kolla 4.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ansible-collection-kolla 2.3.0

This issue was fixed in the openstack/ansible-collection-kolla 2.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ansible-collection-kolla 5.0.0.0rc1

This issue was fixed in the openstack/ansible-collection-kolla 5.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.