Fix for fluentd not starting in production. (Reason : Fluentd directory inside /tmp were cleared off during reboot)
Now fluentd directory for logs has been moved to /var/log/voltha in the cluster host machines.
Addressed review comments.
https://jira.opencord.org/browse/VOL-354
Change-Id: If536c2c68afda4f1da93010287a698a101e22557
diff --git a/compose/docker-compose-fluentd-cluster.yml b/compose/docker-compose-fluentd-cluster.yml
index c21f37d..5e46f54 100644
--- a/compose/docker-compose-fluentd-cluster.yml
+++ b/compose/docker-compose-fluentd-cluster.yml
@@ -23,7 +23,7 @@
ports:
- "24224"
volumes:
- - "/tmp/fluentd:/fluentd/log"
+ - "/var/log/voltha:/fluentd/log"
fluentdstby:
image: fluent/fluentd
@@ -36,7 +36,7 @@
ports:
- "24224"
volumes:
- - "/tmp/fluentd:/fluentd/log"
+ - "/var/log/voltha:/fluentd/log"
fluentd:
image: cord/fluentd
diff --git a/install/ansible/roles/cluster-host/tasks/main.yml b/install/ansible/roles/cluster-host/tasks/main.yml
index 228a54e..099eb25 100644
--- a/install/ansible/roles/cluster-host/tasks/main.yml
+++ b/install/ansible/roles/cluster-host/tasks/main.yml
@@ -85,9 +85,9 @@
# - ubuntu-core-launcher
# - snapd
# tags: [cluster_host]
-- name: A fluentd directory under tmp for voltha logs exists
+- name: A voltha directory under /var/log for voltha logs exists
file:
- path: "/tmp/fluentd"
+ path: "/var/log/voltha"
state: directory
tags: [cluster_host]