diff --git a/ansible/roles/common/tasks/bootstrap.yml b/ansible/roles/common/tasks/bootstrap.yml index 4329d7a956..c759d102c9 100644 --- a/ansible/roles/common/tasks/bootstrap.yml +++ b/ansible/roles/common/tasks/bootstrap.yml @@ -5,3 +5,10 @@ action: "create_volume" common_options: "{{ docker_common_options }}" name: "kolla_logs" + +- name: Link kolla_logs volume to /var/log/kolla + become: true + file: + src: /var/lib/docker/volumes/kolla_logs/_data + path: /var/log/kolla + state: link diff --git a/doc/source/user/troubleshooting.rst b/doc/source/user/troubleshooting.rst index 9e8ef3c6e1..013b735f93 100644 --- a/doc/source/user/troubleshooting.rst +++ b/doc/source/user/troubleshooting.rst @@ -95,6 +95,14 @@ provide no information. To learn more about Docker command line operation please refer to `Docker documentation `__. +The log volume "kolla_logs" is linked to ``/var/log/kolla`` on the host. +You can find all kolla logs in there. + +.. code-block:: console + + readlink -f /var/log/kolla + /var/lib/docker/volumes/kolla_logs/_data + When ``enable_central_logging`` is enabled, to view the logs in a web browser using Kibana, go to ``http://:`` or diff --git a/releasenotes/notes/link_kolla_logs-e57a1e583f2872eb.yaml b/releasenotes/notes/link_kolla_logs-e57a1e583f2872eb.yaml new file mode 100644 index 0000000000..3cfa174a26 --- /dev/null +++ b/releasenotes/notes/link_kolla_logs-e57a1e583f2872eb.yaml @@ -0,0 +1,6 @@ +--- +other: + - | + Link kolla_logs docker volume to /var/log/kolla. + Shorter log path will help to debug from log. + The volume path is compatible with docker-engine and docker-ce. diff --git a/tools/cleanup-containers b/tools/cleanup-containers index a9eec11302..91a22056f4 100755 --- a/tools/cleanup-containers +++ b/tools/cleanup-containers @@ -43,4 +43,7 @@ done echo "Removing volumes..." (docker volume rm ${volumes_to_remove} 2>&1) > /dev/null +echo "Removing link of kolla_log volume..." +(rm -f /var/log/kolla 2>&1) > /dev/null + echo "All cleaned up!"