diff options
| author | Carlos Cesario <carloscesario@gmail.com> | 2016-04-03 15:30:45 -0300 |
|---|---|---|
| committer | Carlos Cesario <carloscesario@gmail.com> | 2016-04-03 18:55:00 -0300 |
| commit | 1e8abe35926a96bd6d8fab8c299b6ee21adddacd (patch) | |
| tree | c66ebe2102631552775789b1cdf434eac7b44d34 | |
| parent | 808d6baa448533b7dca98eca728c06d4323de22b (diff) | |
| download | kolla-1e8abe35926a96bd6d8fab8c299b6ee21adddacd.tar.gz kolla-1e8abe35926a96bd6d8fab8c299b6ee21adddacd.zip | |
Make Heka write Keepalived logs to dedicated directory
Currently Heka writes the keepalived logs in
/var/log/kolla/haproxy/keepalived.log.
This commit changes this to /var/log/kolla/keepalived/keepalived.log.
Closes-Bug: #1565499
Change-Id: I3033097bd77ddbf72948697b34a6a499ea903083
5 files changed, 19 insertions, 9 deletions
diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index c26166cfa..61d272cd2 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -27,6 +27,7 @@ - { name: "global", enabled: "yes" } - { name: "haproxy", enabled: "{{ enable_haproxy }}" } - { name: "horizon", enabled: "{{ enable_horizon }}" } + - { name: "keepalived", enabled: "{{ enable_haproxy }}" } - { name: "keystone", enabled: "{{ enable_keystone }}" } - { name: "mariadb", enabled: "{{ enable_mariadb }}" } - { name: "openstack", enabled: "yes" } diff --git a/ansible/roles/common/templates/cron-logrotate-keepalived.conf.j2 b/ansible/roles/common/templates/cron-logrotate-keepalived.conf.j2 index 0346c051d..680874634 100644 --- a/ansible/roles/common/templates/cron-logrotate-keepalived.conf.j2 +++ b/ansible/roles/common/templates/cron-logrotate-keepalived.conf.j2 @@ -1,3 +1,3 @@ -"/var/log/kolla/haproxy/keepalived.log" +"/var/log/kolla/keepalived/keepalived.log" { } diff --git a/ansible/roles/common/templates/heka-haproxy.toml.j2 b/ansible/roles/common/templates/heka-haproxy.toml.j2 index 102356906..49338fd0a 100644 --- a/ansible/roles/common/templates/heka-haproxy.toml.j2 +++ b/ansible/roles/common/templates/heka-haproxy.toml.j2 @@ -1,4 +1,4 @@ -# HAProxy and Keepalived write their logs to Syslog, so the generic +# HAProxy writes its logs to Syslog, so the generic # Syslog input set in heka-global.toml.j2 is used. [haproxy_file_output] @@ -7,10 +7,3 @@ message_matcher = "Fields[programname] =~ /(?i:haproxy)/" path = "/var/log/kolla/haproxy/haproxy.log" encoder = "syslog_encoder" folder_perm = "755" - -[keepalived_file_output] -type = "FileOutput" -message_matcher = "Fields[programname] =~ /(?i:keepalived)/" -path = "/var/log/kolla/haproxy/keepalived.log" -encoder = "syslog_encoder" -folder_perm = "755" diff --git a/ansible/roles/common/templates/heka-keepalived.toml.j2 b/ansible/roles/common/templates/heka-keepalived.toml.j2 new file mode 100644 index 000000000..215998234 --- /dev/null +++ b/ansible/roles/common/templates/heka-keepalived.toml.j2 @@ -0,0 +1,9 @@ +# Keepalived writes its logs to Syslog, so the generic +# Syslog input set in heka-global.toml.j2 is used. + +[keepalived_file_output] +type = "FileOutput" +message_matcher = "Fields[programname] =~ /(?i:keepalived)/" +path = "/var/log/kolla/keepalived/keepalived.log" +encoder = "syslog_encoder" +folder_perm = "755" diff --git a/ansible/roles/common/templates/heka.json.j2 b/ansible/roles/common/templates/heka.json.j2 index a23162d01..2cb4bcbe5 100644 --- a/ansible/roles/common/templates/heka.json.j2 +++ b/ansible/roles/common/templates/heka.json.j2 @@ -23,6 +23,13 @@ "optional": {{ (not enable_haproxy | bool) | string | lower }} }, { + "source": "{{ container_config_directory }}/heka-keepalived.toml", + "dest": "/etc/heka/heka-keepalived.toml", + "owner": "heka", + "perm": "0600", + "optional": {{ (not enable_haproxy | bool) | string | lower }} + }, + { "source": "{{ container_config_directory }}/heka-rabbitmq.toml", "dest": "/etc/heka/heka-rabbitmq.toml", "owner": "heka", |
