Bug 1815512

Summary: ironic processes always record logs into syslog in addition to log files under /var/log/ironic
Product: Red Hat OpenStack Reporter: Takashi Kajinami <tkajinam>
Component: openstack-ironicAssignee: RHOS Maint <rhos-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Alistair Tonner <atonner>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: bfournie, dtantsur, mburns
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-23 19:11:13 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:19:28 UTC
Description of problem:

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

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

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

There are no reasons why ironic 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 logs are recorded in messages

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

Additional info:

Comment 1 Takashi Kajinami 2020-03-20 13:29:08 UTC
I see that bz 1574152 was reported for RHOSP10, and closed as WON'T FIX,
as we don't prefer to backport it.
Should be this bug also closed ?

IIUC the logs are still recorded into ironic logs file, so I don't think
this change can affect debbugging, IMO.

Comment 2 Bob Fournier 2020-04-09 15:55:39 UTC
Takashi - will you be creating a patch for ironic for this issue similar to the one you did for ironic-inspector?

Comment 3 Takashi Kajinami 2020-04-09 16:11:14 UTC
I see that ironic-distgit has the fix for this issue since rocky[1],
so I submitted its backport to queens[2].
 [1] https://review.rdoproject.org/r/#/c/26363/
 [2] https://review.rdoproject.org/r/#/c/26363/

IIUC, in bz 1574152 for RHOSP10, we decided not to backport the fix to RHOSP10
because the change can affect users who expect ironic logs in messages.
So I'd like to ask some opinion from Engineering to know whether we should apply
the same policy to RHOSP13 (I mean, close this bug and won't fix and abandon the backport)

Also, please note there is another bug for the smilar issue in ironic-inspector (bz 1815516),
and IMO we should be consistent in our policy about backports to queens.

Comment 4 Takashi Kajinami 2020-04-09 16:11:40 UTC
Sorry for the wrong link
 [1] https://review.rdoproject.org/r/#/c/15213/

Comment 5 Bob Fournier 2020-04-09 16:22:23 UTC
Yes I forgot that we already made that change in Rocky.  I don't think we should backport this to Queens, as you indicated it will affect the debug experience for users when they upgrade.  We should do the same for ironic-inspector - not backport to Queens.

Comment 6 Bob Fournier 2020-06-23 19:11:13 UTC
As this is marked but for 17, but its already been fixed in Rocky and later, we can close this.  This won't be backported to OSP-13 because of the changes to debugging it would introduce.