From 9e30c008b58b48124393e7e2179f2783916a36e2 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 1 Aug 2023 11:50:35 +0200 Subject: [PATCH] Add support for setting Docker daemon debug Enable that by default in CI Change-Id: I654f4dfa73afee478fb2c39594dc6f36081fb7c0 --- ansible/roles/docker/defaults/main.yml | 1 + ansible/roles/docker/templates/daemon.json.j2 | 3 +++ playbooks/kayobe-infra-vm-base/overrides.yml.j2 | 1 + playbooks/kayobe-overcloud-base/overrides.yml.j2 | 1 + playbooks/kayobe-overcloud-upgrade-base/overrides.yml.j2 | 1 + playbooks/kayobe-seed-base/overrides.yml.j2 | 1 + playbooks/kayobe-seed-upgrade-base/overrides.yml.j2 | 1 + playbooks/kayobe-seed-vm-base/overrides.yml.j2 | 1 + 8 files changed, 10 insertions(+) diff --git a/ansible/roles/docker/defaults/main.yml b/ansible/roles/docker/defaults/main.yml index 2f6349913..d9df1ef78 100644 --- a/ansible/roles/docker/defaults/main.yml +++ b/ansible/roles/docker/defaults/main.yml @@ -3,5 +3,6 @@ docker_storage_driver: overlay2 docker_storage_volume_group: docker_storage_volume_thinpool: docker_registry_mirrors: [] +docker_daemon_debug: false docker_daemon_mtu: 1500 docker_daemon_live_restore: false diff --git a/ansible/roles/docker/templates/daemon.json.j2 b/ansible/roles/docker/templates/daemon.json.j2 index da8ede525..bf392d560 100644 --- a/ansible/roles/docker/templates/daemon.json.j2 +++ b/ansible/roles/docker/templates/daemon.json.j2 @@ -1,4 +1,7 @@ { +{%- if docker_daemon_debug | bool %} + "debug": {{ docker_daemon_debug | to_json }}, +{%- endif %} {%- if docker_registry_mirrors | length > 0 %} "registry-mirrors": [ {%- for mirror in docker_registry_mirrors %} diff --git a/playbooks/kayobe-infra-vm-base/overrides.yml.j2 b/playbooks/kayobe-infra-vm-base/overrides.yml.j2 index 061d7589c..79e67bca4 100644 --- a/playbooks/kayobe-infra-vm-base/overrides.yml.j2 +++ b/playbooks/kayobe-infra-vm-base/overrides.yml.j2 @@ -1,4 +1,5 @@ --- +docker_daemon_debug: true # Use the OpenStack infra's Dockerhub mirror. docker_registry_mirrors: - "http://{{ zuul_site_mirror_fqdn }}:8082/" diff --git a/playbooks/kayobe-overcloud-base/overrides.yml.j2 b/playbooks/kayobe-overcloud-base/overrides.yml.j2 index c33769875..cae26b818 100644 --- a/playbooks/kayobe-overcloud-base/overrides.yml.j2 +++ b/playbooks/kayobe-overcloud-base/overrides.yml.j2 @@ -1,4 +1,5 @@ --- +docker_daemon_debug: true # Use the OpenStack infra's Dockerhub mirror. docker_registry_mirrors: - "http://{{ zuul_site_mirror_fqdn }}:8082/" diff --git a/playbooks/kayobe-overcloud-upgrade-base/overrides.yml.j2 b/playbooks/kayobe-overcloud-upgrade-base/overrides.yml.j2 index d499f5cd5..84301ef94 100644 --- a/playbooks/kayobe-overcloud-upgrade-base/overrides.yml.j2 +++ b/playbooks/kayobe-overcloud-upgrade-base/overrides.yml.j2 @@ -1,4 +1,5 @@ --- +docker_daemon_debug: true # Use the OpenStack infra's Dockerhub mirror. docker_registry_mirrors: - "http://{{ zuul_site_mirror_fqdn }}:8082/" diff --git a/playbooks/kayobe-seed-base/overrides.yml.j2 b/playbooks/kayobe-seed-base/overrides.yml.j2 index f5cca32d9..062ab6c15 100644 --- a/playbooks/kayobe-seed-base/overrides.yml.j2 +++ b/playbooks/kayobe-seed-base/overrides.yml.j2 @@ -1,4 +1,5 @@ --- +docker_daemon_debug: true # Use the OpenStack infra's Dockerhub mirror. docker_registry_mirrors: - "http://{{ zuul_site_mirror_fqdn }}:8082/" diff --git a/playbooks/kayobe-seed-upgrade-base/overrides.yml.j2 b/playbooks/kayobe-seed-upgrade-base/overrides.yml.j2 index 81b539e03..185d42420 100644 --- a/playbooks/kayobe-seed-upgrade-base/overrides.yml.j2 +++ b/playbooks/kayobe-seed-upgrade-base/overrides.yml.j2 @@ -1,4 +1,5 @@ --- +docker_daemon_debug: true # Use the OpenStack infra's Dockerhub mirror. docker_registry_mirrors: - "http://{{ zuul_site_mirror_fqdn }}:8082/" diff --git a/playbooks/kayobe-seed-vm-base/overrides.yml.j2 b/playbooks/kayobe-seed-vm-base/overrides.yml.j2 index 108efb74f..085ea11f5 100644 --- a/playbooks/kayobe-seed-vm-base/overrides.yml.j2 +++ b/playbooks/kayobe-seed-vm-base/overrides.yml.j2 @@ -1,4 +1,5 @@ --- +docker_daemon_debug: true # Use the OpenStack infra's Dockerhub mirror. docker_registry_mirrors: - "http://{{ zuul_site_mirror_fqdn }}:8082/"