contrail 4.0: fix missing logs
Turns out zookeeper and cassandra logs
were present only in controller and analyticsdb
containers and not on host. This patch
addresses the issue by mounting log directories
as volumes.
Changed for both cluster and control/analytics
model following the approach for kafka logs.
PROD-23971
Change-Id: I97ff3b8418c02dc1036aef468cc5195991d66196
diff --git a/opencontrail/control/control4_0.yml b/opencontrail/control/control4_0.yml
index dfad397..ba47959 100644
--- a/opencontrail/control/control4_0.yml
+++ b/opencontrail/control/control4_0.yml
@@ -8,6 +8,9 @@
opencontrail_version: 4.0
linux_repo_contrail_component: oc40
opencontrail_image_tag: latest
+ opencontrail_host_configdb_log_dir: '/var/log/configdb'
+ opencontrail_cassandra_log_dir: '/var/log/cassandra'
+ opencontrail_zookeeper_log_dir: '/var/log/zookeeper'
opencontrail_message_queue_node01_address: ${_param:openstack_message_queue_node01_address}
opencontrail_message_queue_node02_address: ${_param:openstack_message_queue_node02_address}
opencontrail_message_queue_node03_address: ${_param:openstack_message_queue_node03_address}
@@ -83,6 +86,7 @@
host: ${_param:openstack_control_address}
database:
config_only: true
+ configdb_log_dir: ${_param:opencontrail_host_configdb_log_dir}
analytics:
members:
- host: ${_param:opencontrail_analytics_node01_address}
@@ -116,6 +120,8 @@
- /etc/zookeeper/conf/log4j.properties:/etc/zookeeper/conf/log4j.properties
- /var/log/contrail:/var/log/contrail
- /var/log/journal/contrail-controller:/var/log/journal
+ - ${_param:opencontrail_host_configdb_log_dir}/cassandra:${_param:opencontrail_cassandra_log_dir}
+ - ${_param:opencontrail_host_configdb_log_dir}/zookeeper:${_param:opencontrail_zookeeper_log_dir}
network_mode: "host"
privileged: true
restart: always