Merge "Link kolla_log volume dir to /var/log/kolla"

This commit is contained in:
Zuul 2019-01-28 10:40:59 +00:00 committed by Gerrit Code Review
commit 45ee749a6a
4 changed files with 24 additions and 0 deletions

View File

@ -5,3 +5,10 @@
action: "create_volume" action: "create_volume"
common_options: "{{ docker_common_options }}" common_options: "{{ docker_common_options }}"
name: "kolla_logs" 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

View File

@ -95,6 +95,14 @@ provide no information.
To learn more about Docker command line operation please refer to `Docker To learn more about Docker command line operation please refer to `Docker
documentation <https://docs.docker.com/reference/>`__. documentation <https://docs.docker.com/reference/>`__.
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 When ``enable_central_logging`` is enabled, to view the logs in a web browser
using Kibana, go to using Kibana, go to
``http://<kolla_internal_vip_address>:<kibana_server_port>`` or ``http://<kolla_internal_vip_address>:<kibana_server_port>`` or

View File

@ -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.

View File

@ -43,4 +43,7 @@ done
echo "Removing volumes..." echo "Removing volumes..."
(docker volume rm ${volumes_to_remove} 2>&1) > /dev/null (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!" echo "All cleaned up!"