From c4ebd990301c997ecf25959df8ae3f0da6471f89 Mon Sep 17 00:00:00 2001 From: Serhat Demircan Date: Thu, 16 May 2019 11:28:25 +0300 Subject: [PATCH] link kolla_logs volume to docker_runtime_directory if docker_runtime_directory variable exists Change-Id: I053c4a47e657effe25e8d75a3ef55477635729d2 --- ansible/group_vars/all.yml | 1 + ansible/roles/baremetal/defaults/main.yml | 2 -- ansible/roles/common/tasks/bootstrap.yml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index ca1d2971e2..71aeeaaa2b 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -94,6 +94,7 @@ docker_registry: docker_namespace: "kolla" docker_registry_username: docker_registry_insecure: "{{ 'yes' if docker_registry else 'no' }}" +docker_runtime_directory: "" # Retention settings for Docker logs docker_log_max_file: 5 diff --git a/ansible/roles/baremetal/defaults/main.yml b/ansible/roles/baremetal/defaults/main.yml index 4627672f51..d3bbe95860 100644 --- a/ansible/roles/baremetal/defaults/main.yml +++ b/ansible/roles/baremetal/defaults/main.yml @@ -66,8 +66,6 @@ docker_storage_driver: "" docker_custom_option: "" -docker_runtime_directory: "" - # Ubuntu 18+ does not have easy_install available due to # https://bugs.launchpad.net/ubuntu/+source/python-setuptools/+bug/1774419. easy_install_available: >- diff --git a/ansible/roles/common/tasks/bootstrap.yml b/ansible/roles/common/tasks/bootstrap.yml index c759d102c9..67026082a4 100644 --- a/ansible/roles/common/tasks/bootstrap.yml +++ b/ansible/roles/common/tasks/bootstrap.yml @@ -9,6 +9,6 @@ - name: Link kolla_logs volume to /var/log/kolla become: true file: - src: /var/lib/docker/volumes/kolla_logs/_data + src: "{{ docker_runtime_directory or '/var/lib/docker' }}/volumes/kolla_logs/_data" path: /var/log/kolla state: link