Skip to content
Snippets Groups Projects
Commit 93e5e8e6 authored by binhong.hua's avatar binhong.hua
Browse files

Link kolla_log volume dir to /var/log/kolla

The path /var/lib/docker/volumes/kolla_logs/_data/ is too long
shorter log path will help to debug from log.
The volume path is compatible with docker-engine and docker-ce.

Change-Id: I9195d5f24d938f5060fe748aac3ae58c79ec5abf
parent 2674344b
No related branches found
No related tags found
No related merge requests found
...@@ -5,3 +5,10 @@ ...@@ -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
...@@ -95,6 +95,14 @@ provide no information. ...@@ -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
......
---
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.
...@@ -43,4 +43,7 @@ done ...@@ -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!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment