From a24f5590a29795f3d1442ac1c8babd88fd1d5889 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 16 Oct 2015 08:27:51 +0100 Subject: [PATCH] Put swift {account,container,object} logs where they belong The pattern for nova and neutron on hosts is to have a symlink from /var/log/{service} to /openstack/log/_hostname_-{service}/ and then to have all the service logs configured to log to /var/log/{service} as that is a logical place for an operator to look for them. Swift currently does not follow that pattern. Currently the swift {account,container,object} logs are placed in /openstack/log/{hostname}/, whereas the proxy logs are placed in /var/log/swift/. On hosts the /var/log/swift symlink to /openstack/log/{hostname}-swift/ is created, but not used. This creates confusion for operators trying to find the logs in the logical (and upstream) pattern in the directory /var/log/{service}. This patch puts the swift logs where they belong. Upgrade Notes: - This changes the location of the log storage on swift hosts from /openstack/log/{hostname} to /openstack/log/{hostname}-swift - Any log processing or monitoring tooling that consumes swift logs will need to be adjusted to consume them from the new location, or simply to consume them from /var/log/swift DocImpact UpgradeImpact Closes-Bug: #1417536 Change-Id: I8d6ec98d310ce8d4e4a7a6cc5fb2d349d17757cf --- templates/swift-rsyslog.conf.j2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/swift-rsyslog.conf.j2 b/templates/swift-rsyslog.conf.j2 index ce21fc66..05d1a8e1 100644 --- a/templates/swift-rsyslog.conf.j2 +++ b/templates/swift-rsyslog.conf.j2 @@ -1,24 +1,24 @@ # {{ ansible_managed }} # Uncomment the following to have a log containing all logs together -#local1,local2,local3,local4.* /openstack/log/{{ inventory_hostname }}/all.log +#local1,local2,local3,local4.* /var/log/swift/all.log # Uncomment the following to have hourly proxy logs for stats processing -#$template HourlyProxyLog,"/openstack/log/{{ inventory_hostname }}/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%" +#$template HourlyProxyLog,"/var/log/swift/hourly/%$YEAR%%$MONTH%%$DAY%%$HOUR%" #local1.*;local1.!notice ?HourlyProxyLog local1.*;local1.!notice /var/log/swift/proxy.log local1.notice /var/log/swift/proxy-error.log local1.* ~ -local2.*;local2.!notice /openstack/log/{{ inventory_hostname }}/account.log -local2.notice /openstack/log/{{ inventory_hostname }}/account-error.log +local2.*;local2.!notice /var/log/swift/account.log +local2.notice /var/log/swift/account-error.log local2.* ~ -local3.*;local3.!notice /openstack/log/{{ inventory_hostname }}/container.log -local3.notice /openstack/log/{{ inventory_hostname }}/container-error.log +local3.*;local3.!notice /var/log/swift/container.log +local3.notice /var/log/swift/container-error.log local3.* ~ -local4.*;local4.!notice /openstack/log/{{ inventory_hostname }}/object.log -local4.notice /openstack/log/{{ inventory_hostname }}/object-error.log +local4.*;local4.!notice /var/log/swift/object.log +local4.notice /var/log/swift/object-error.log local4.* ~