Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1083047

Summary: [RFE] Move all logging to systemd journal only
Product: Red Hat OpenStack Reporter: Vladan Popovic <vpopovic>
Component: rhosp-directorAssignee: Angus Thomas <athomas>
Status: CLOSED WONTFIX QA Contact: Omri Hochman <ohochman>
Severity: low Docs Contact:
Priority: low    
Version: 5.0 (RHEL 7)CC: amuller, apevec, chrisw, dbecker, eglynn, fdinitto, fpercoco, jcoufal, lars, lhh, lpeer, markmc, mburns, mcornea, morazi, nyechiel, rhel-osp-director-maint, robert.vanleeuwen, rscarazz, srevivo, vpopovic
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 966050 Environment:
Last Closed: 2017-07-17 15:22:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vladan Popovic 2014-04-01 11:50:38 UTC
+++ This bug was initially created as a clone of Bug #966050 +++

Description of problem:
Double logging when using syslog; 

Doubled logging when configuring syslog: logging will go to syslog AND to file.

The initscripts of the various components include a --logfile $logfile
This will always turn on logging to file even if syslog is setup in the nova config.

Note that this bug is a duplicate of the bugreport in EPEL: https://bugzilla.redhat.com/show_bug.cgi?id=892626

I recreate this report since RDO is split of from the EPEL version (and that nothing happened with that bugreport)

--- Additional comment from Pádraig Brady on 2014-01-15 09:43:48 EST ---



--- Additional comment from Xavier Queralt on 2014-03-10 09:38:28 EDT ---

I think there is no specify the logfile in the service script. Vladan, could you change this in the nova service scripts while doing the next build?

--- Additional comment from Alan Pevec on 2014-04-01 06:15:02 EDT ---

(In reply to Xavier Queralt from comment #2)
> I think there is no specify the logfile in the service script.

--logfile is specified in each service script so they have separate log files.

> Vladan, could you change this in the nova service scripts while doing the next build?

If you want to remove --logfile, then each service will need separate dist-conf file?

Comment 8 Assaf Muller 2016-04-11 22:48:52 UTC
Shifting component to Oslo log. Regardless if the service got --config_dir/file arguments, Oslo log should be able to determine if to log to syslog, a file, or both. There is nothing specific here to Neutron or any component that uses Oslo log.

Comment 9 Victor Stinner 2016-04-13 10:51:56 UTC
Hum, I don't understand well the issue. I checked an infra running on RHEL 7.2 with OSP 8: yes, the ceilometer-api service file contains "--logfile /var/log/ceilometer/api.log" and so logs are written into this file. But /etc/ceilometer/ceilometer.conf also contains use_stderr=True and so systemd writes logs into journald logs (ex: /var/log/journal/07fe9e721a6f4f9ca756b8208ef823f2/system.journal). But syslog is disabled in this infra: ceilometer.conf contains  use_syslog=False.

So yes, with this config, logs are written into two different files. There are many options to only log into one file, but I'm not sure that I understand well the expectation. Do you prefer to into journald or /var/log/ceilometer/api.log? And how and when do expect to configure Ceilometer logs?

I mean that the program does what we expect from it: it logs into stderr and into api.log, it more looks like a configuration issue than a bug in oslo.log to me.

Comment 11 Victor Stinner 2016-04-18 10:04:32 UTC
@Vladan: Did you see my comment? Can you please elaborate your use case? I'm not sure that I understood correctly the issue.

Comment 13 Victor Stinner 2016-06-30 12:27:44 UTC
Oh, I just noticed that Vladan Popovic is no more working for Red Hat. So I don't expect an answer anymore :-)

IMO this issue is *not* a bug in Oslo Log. As I wrote, Oslo Log does exactly what we asked it to do.

The issue is more a configuration issue. Maybe a "bad" default configuration in the OSP installer, so I reassigned the bug to RHEL OSP director. I'm not sure that it's the wrong component.

The problem is that I still don't know what is the "right" configuration (expected behaviour). There is also a risk of regression if some users use one file which is no more feeded if we change something in an old version of OSP. Maybe we should only change that in a new major OSP version? Sorry, I have more questions than answers.

Comment 14 Alan Pevec 2016-06-30 12:41:00 UTC
IIRC there were some issues logrotating files (can't find bz# now) so best would be to move to journal logging only.
But that's a significant change which might surprise on upgrades, let's consider it as RFE for the next release.

Comment 15 Alan Pevec 2016-06-30 12:42:58 UTC
And we should do it in RDO packaging first, I'll add it on agenda for the next week: https://etherpad.openstack.org/p/RDO-Meeting

Comment 16 Lars Kellogg-Stedman 2017-07-17 15:22:05 UTC
We're closing this because the focus on a containerized deployment means that log disposition will likely be handled at a different level and using different tools.