Bug 1815516

Summary: ironic-inspector processes always record logs into syslog in addition to log files under /var/log/ironic-inspector
Product: Red Hat OpenStack Reporter: Takashi Kajinami <tkajinam>
Component: openstack-ironic-inspectorAssignee: RHOS Maint <rhos-maint>
Status: CLOSED ERRATA QA Contact: Alistair Tonner <atonner>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: bfournie, dtantsur, mburns, slinaber
Target Milestone: betaKeywords: Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ironic-inspector-9.2.3-0.20200525133443.a1a08df.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-29 07:51:01 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 Takashi Kajinami 2020-03-20 13:35:17 UTC
Description of problem:

# This is the similar problem as bz 1815512 , but for another component, so I'll file another independent one.

In undercloud, we observe ironic-inspector always record logs into syslog, while it also record logs into its log files under /var/log/ironic-inspector .

This is because we have the following configuration in inspector-dist.conf

/etc/ironic-inspector/inspector-dist.conf
~~~
[DEFAULT]
log_dir = /var/log/ironic-inspector
state_path = /var/lib/ironic-inspector
use_stderr = True <==========(*)
~~~

There are no reasons why ironic-inspector should record logs in deprecated locations, and this use_stderr should be false by default
to be consistent with the other components like nova, neutron, and etc .

/usr/share/nova/nova-dist.conf
~~~
[DEFAULT]
log_dir = /var/log/nova
state_path = /var/lib/nova
lock_path = /var/lib/nova/tmp
dhcpbridge = /usr/bin/nova-dhcpbridge
dhcpbridge_flagfile = /usr/share/nova/nova-dist.conf
dhcpbridge_flagfile = /etc/nova/nova.conf
force_dhcp_release = True
injected_network_template = /usr/share/nova/interfaces.template
libvirt_nonblocking = True
libvirt_inject_partition = -1
compute_driver = libvirt.LibvirtDriver
rootwrap_config = /etc/nova/rootwrap.conf
use_stderr = False <==========(*)

...
~~~


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Deploy undercloud
2. See /var/log/messages in host

Actual results:
ironic-inspector logs are recorded in messages

Expected results:
ironic-inspector logs are not recorded in messages, but found only in ironic-inspector log files

Additional info:

Comment 5 Bob Fournier 2020-06-16 20:56:46 UTC
Verified in compose RHOS-16.1-RHEL-8-20200611.n.0.

()[ironic-inspector@hardprov-dl360-g9-01 /]$ cat /etc/ironic-inspector/inspector-dist.conf
[DEFAULT]
log_dir = /var/log/ironic-inspector
state_path = /var/lib/ironic-inspector
use_stderr = False

There are no ironic-inspector logs in /var/log/messages.

Comment 8 errata-xmlrpc 2020-07-29 07:51:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:3148