From c70285068c0ec1270188f3fde6675499ce66916d Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 30 Jun 2017 15:26:40 +0100 Subject: [PATCH] Add logrotate configuration for ironic inspector Logrotate configuration is missing for ironic-inspector. Prior to [1], ironic-inspector logs were stored in kolla_logs/ironic/ironic-inspector.log. After [1], the logs are stored in kolla_logs/ironic-inspector/ironic-inspector.log but the logrotate config was not updated. [1] https://github.com/openstack/kolla-ansible/commit/07453f346094b184a209380e375f6311987675be Change-Id: I7e78faea361cd67069c1a96aaf0a2ffffc0e8666 Closes-Bug: #1701578 --- ansible/roles/common/tasks/config.yml | 1 + .../common/templates/cron-logrotate-ironic-inspector.conf.j2 | 3 +++ ansible/roles/common/templates/cron.json.j2 | 1 + 3 files changed, 5 insertions(+) create mode 100644 ansible/roles/common/templates/cron-logrotate-ironic-inspector.conf.j2 diff --git a/ansible/roles/common/tasks/config.yml b/ansible/roles/common/tasks/config.yml index 0f29406804..e8b4621754 100644 --- a/ansible/roles/common/tasks/config.yml +++ b/ansible/roles/common/tasks/config.yml @@ -113,6 +113,7 @@ - { name: "heat", enabled: "{{ enable_heat }}" } - { name: "influxdb", enabled: "{{ enable_influxdb }}" } - { name: "ironic", enabled: "{{ enable_ironic }}" } + - { name: "ironic-inspector", enabled: "{{ enable_ironic }}" } - { name: "iscsid", enabled: "{{ enable_iscsid }}" } - { name: "karbor", enabled: "{{ enable_karbor }}" } - { name: "keepalived", enabled: "{{ enable_haproxy }}" } diff --git a/ansible/roles/common/templates/cron-logrotate-ironic-inspector.conf.j2 b/ansible/roles/common/templates/cron-logrotate-ironic-inspector.conf.j2 new file mode 100644 index 0000000000..a3fe9a18a5 --- /dev/null +++ b/ansible/roles/common/templates/cron-logrotate-ironic-inspector.conf.j2 @@ -0,0 +1,3 @@ +"/var/log/kolla/ironic-inspector/*.log" +{ +} diff --git a/ansible/roles/common/templates/cron.json.j2 b/ansible/roles/common/templates/cron.json.j2 index e9c2e4a2d1..b1f42a3434 100644 --- a/ansible/roles/common/templates/cron.json.j2 +++ b/ansible/roles/common/templates/cron.json.j2 @@ -21,6 +21,7 @@ ( 'heat', enable_heat ), ( 'influxdb', enable_influxdb ), ( 'ironic', enable_ironic ), + ( 'ironic-inspector', enable_ironic ), ( 'iscsid', enable_iscsid ), ( 'karbor', enable_karbor ), ( 'keepalived', enable_haproxy ),