aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbinhong.hua <huabinhong@unitedstack.com>2019-01-23 14:08:25 +0800
committerbinhong.hua <huabinhong@unitedstack.com>2019-01-24 11:02:48 +0800
commit93e5e8e631eb89599913bffe0fe76d24a835d4ff (patch)
tree66f256082bbc97d0e8bc3a770f439cb65253d1b9
parent2674344bbe2d934eb879b6fc0240fa13b1bba917 (diff)
downloadkolla-ansible-93e5e8e631eb89599913bffe0fe76d24a835d4ff.tar.gz
kolla-ansible-93e5e8e631eb89599913bffe0fe76d24a835d4ff.zip
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
-rw-r--r--ansible/roles/common/tasks/bootstrap.yml7
-rw-r--r--doc/source/user/troubleshooting.rst8
-rw-r--r--releasenotes/notes/link_kolla_logs-e57a1e583f2872eb.yaml6
-rwxr-xr-xtools/cleanup-containers3
4 files changed, 24 insertions, 0 deletions
diff --git a/ansible/roles/common/tasks/bootstrap.yml b/ansible/roles/common/tasks/bootstrap.yml
index 4329d7a95..c759d102c 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 9e8ef3c6e..013b735f9 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 <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
using Kibana, go to
``http://<kolla_internal_vip_address>:<kibana_server_port>`` or
diff --git a/releasenotes/notes/link_kolla_logs-e57a1e583f2872eb.yaml b/releasenotes/notes/link_kolla_logs-e57a1e583f2872eb.yaml
new file mode 100644
index 000000000..3cfa174a2
--- /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 a9eec1130..91a22056f 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!"