Bug 1576740 - foreman-debug does not collect qdrouterd.log
Summary: foreman-debug does not collect qdrouterd.log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Debug
Version: 6.3.1
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: 6.4.0
Assignee: Lukas Zapletal
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-10 09:54 UTC by Pavel Moravec
Modified: 2019-11-05 23:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:15:41 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 23556 0 None None None 2018-05-10 14:01:11 UTC

Description Pavel Moravec 2018-05-10 09:54:55 UTC
Description of problem:
Since 6.3, qdrouterd is configured to log to a dedicated file, per:

$ grep output /etc/qpid-dispatch/qdrouterd.conf 
    output: /var/log/qdrouterd/qdrouterd.log
$

That causes qdrouterd does not further log via syslog by default.

Since the logfile isnt collected by foreman-debug, we lack qdrouterd logs in foreman-debug.

Two possible ways to fix this:
- collect the file (in /usr/share/foreman/script/foreman-debug.d/katello-debug.sh I guess)
- have in qdrouterd.conf:

log {
    module: DEFAULT
    enable: info+
    timestamp: true
    output: /var/log/qdrouterd/qdrouterd.log
    output: syslog
}

(what would partially revert the change to separate logging, though)


Version-Release number of selected component (if applicable):
Sat 6.3.1
foreman-debug-1.15.6.36-1.el7sat.noarch
katello-debug-3.4.5-16.el7sat.noarch


How reproducible:
100%


Steps to Reproduce:
1. call foreman-debug and unpack the archive
2. search for qdrouterd.log there 


Actual results:
2. no logfile collected


Expected results:
2. logfile to collect

Additional info:

Comment 2 Lukas Zapletal 2018-05-10 13:42:53 UTC
Thanks Pavel, easy fix and backport as well.

http://projects.theforeman.org/issues/23556

The configuration with syslog is worth creating an upstream ticket, no BZ needed tho.

http://projects.theforeman.org/issues/23557

Comment 3 pm-sat@redhat.com 2018-05-11 12:25:25 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/23556 has been resolved.

Comment 4 Chris Brown 2018-06-21 14:18:49 UTC
In Satellite 6.4, I'm not able to find the qdrouterd.log file

# cat /etc/qpid-dispatch/qdrouterd.conf
...
log {
    module: DEFAULT
    enable: info+
    timestamp: true
    output: /var/log/qdrouterd/qdrouterd.log
}
...
# foreman-debug
# tar -xf /var/tmp/foreman-debug-ykEFS.tar.xz
# find foreman-debug-ykEFS/ -name qdrouterd.log
<No result>
# find /var -name qdrouterd.log
<No result>

Comment 5 Lukas Zapletal 2018-06-21 14:28:31 UTC
I just shutdown my Sat, can you verify this:

grep qrouterd.log /usr/share/foreman/script/foreman-debug.d/*

There was a change apparently which is adding:

/var/log/qdrouterd/qdrouterd.log

It was merged here:

https://github.com/theforeman/foreman-packaging/pull/2468/files

Maybe we missed cherry-pick?

Comment 6 Chris Brown 2018-06-21 14:34:07 UTC
Hi Lukas, there are still no results showing after running the command.

# grep qrouterd.log /usr/share/foreman/script/foreman-debug.d/*

Comment 8 Chris Brown 2018-06-22 12:56:09 UTC
Ok thanks, looks like it's katello version is 3.6.0

Comment 9 Lukas Zapletal 2018-06-25 10:15:38 UTC
I am closing the bug unless there was some issue on the rel-eng side. Chris, can you confirm the bit landed in the snap correctly? I am currently unable to upgrade my snap due to other issue.

Comment 10 Lukas Zapletal 2018-06-25 11:45:51 UTC
Sorry for the confusion, ignore comment 9.

Chris, I please retest with next snap.

Comment 11 Pavel Moravec 2018-06-25 11:45:52 UTC
I can confirm the logfile is not collected by Sat 6.3.2:

[root@pmoravec-sat63 ~]# rpm -q satellite katello
satellite-6.3.2-1.el7sat.noarch
katello-3.4.5-18.el7sat.noarch
[root@pmoravec-sat63 ~]# grep -r qdrouterd $(rpm -ql katello-debug foreman-debug) | sort -u
/usr/share/foreman/script/foreman-debug.d/katello-debug.sh:  add_files /etc/qpid-dispatch/qdrouterd.conf
[root@pmoravec-sat63 ~]# 

and generated foreman-debug does contain only the config file.

So if the fix was added to RC1, then we / engineering should file BZ against RCM. Until that, the bug is still valid - foreman-debug shipped to customers still do not collect the logfile (and that is what matters to CEE).

Comment 12 Lukas Zapletal 2018-06-25 11:47:55 UTC
Pavel, this is ON_QA for Satellite 6.4. I am not sure how rel-engs want to handle 6.3, it was not yet assigned into any errata. This is 6.4+6.3 BZ.

Comment 14 Chris Brown 2018-06-27 15:08:42 UTC
(In reply to Lukas Zapletal from comment #10)
> Sorry for the confusion, ignore comment 9.
> 
> Chris, I please retest with next snap.

Hey Lukas, I'm still getting the same results using Satellite 6.4.0 snap 9.0

Comment 15 Lukas Zapletal 2018-06-28 11:42:31 UTC
Chris,

the file requested in BZ *is* being collected:

[root@next ~]# grep -n qdrouterd.log /usr/share/foreman/script/foreman-debug.d/katello-debug.sh 
79:  add_files /var/log/qdrouterd/qdrouterd.log

But it does not exist:

[root@next ~]# ls /var/log/qdrouterd/qdrouterd.log
ls: cannot access /var/log/qdrouterd/qdrouterd.log: No such file or directory

If you create a dummy contents debug/sosreport *will* collect it. Therefore IMHO this BZ is VERIFIED.

Why qrouterd is not configured for this file is another story, but this BZ is IMHO solved and closed.

[root@next ~]# grep output /etc/qpid-dispatch/qdrouterd.conf 
    output: syslog

Maybe pmoravec knows.

Comment 16 Lukas Zapletal 2018-06-28 11:44:19 UTC
For the record, I was testing this with Satellite 6.4 and this seems to be correct - long term we want EVERYTHING to be in syslog. That is collected by debug script. For 6.4 this is IMHO VERIFIED.

I guess this needs to by cherrypicked into 6.3 and QAacked there tho.

Comment 17 Pavel Moravec 2018-06-28 12:10:25 UTC
On ony Sat or Caps 6.3 I tried, I see:

$ grep output /etc/qpid-dispatch/qdrouterd.conf
    output: /var/log/qdrouterd/qdrouterd.log
$

So the BZ is 6.3 related _only_, if 6.4 and onwards will log to syslog only.

(lzap, does it make sense to remove collecting the file from upstream foreman/katello-debug? as it seems to be ridiculous? I didnt know the recent change is about to be changed back :-S)

Comment 18 Lukas Zapletal 2018-06-28 14:55:58 UTC
OK Thanks! I am not against but I won't do this :-)

We can move to VERIFIED and wait for 6.3 errata then.

Comment 19 Chris Brown 2018-06-28 17:30:29 UTC
(In reply to Lukas Zapletal from comment #15)
> Chris,
> 
> the file requested in BZ *is* being collected:
> 
> [root@next ~]# grep -n qdrouterd.log
> /usr/share/foreman/script/foreman-debug.d/katello-debug.sh 
> 79:  add_files /var/log/qdrouterd/qdrouterd.log
> 
> But it does not exist:
> 
> [root@next ~]# ls /var/log/qdrouterd/qdrouterd.log
> ls: cannot access /var/log/qdrouterd/qdrouterd.log: No such file or directory
> 
> If you create a dummy contents debug/sosreport *will* collect it. Therefore
> IMHO this BZ is VERIFIED.
> 
> Why qrouterd is not configured for this file is another story, but this BZ
> is IMHO solved and closed.
> 
> [root@next ~]# grep output /etc/qpid-dispatch/qdrouterd.conf 
>     output: syslog
> 
> Maybe pmoravec knows.

Oh ok, thanks for the clarification.

Comment 21 Bryan Kearney 2018-10-16 19:15:41 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/RHSA-2018:2927


Note You need to log in before you can comment on or make changes to this bug.