Bug 2149817 - The output of "qpid-stat -q" shows errors in the sosreport [NEEDINFO]
Summary: The output of "qpid-stat -q" shows errors in the sosreport
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: 8.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-12-01 03:06 UTC by Jessica Richards
Modified: 2023-06-26 13:56 UTC (History)
9 users (show)

Fixed In Version: sos-4.5.4-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-06-26 13:55:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pmoravec: needinfo? (jrichards2)


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 3251 0 None open [foreman] collect qpid-stat -q 2023-05-25 15:18:52 UTC
Red Hat Issue Tracker RHELPLAN-140994 0 None None None 2022-12-01 04:01:13 UTC

Description Jessica Richards 2022-12-01 03:06:16 UTC
Description of problem:

The sosreport contains two output files for the command "qpid-stat -q":

sos_commands/pulp/qpid-stat_-q_--ssl-certificate_-b_amqps_..localhost_5671
sos_commands/qpid/qpid-stat_-q


Both of these files contain errors:

sos_commands/pulp/qpid-stat_-q_--ssl-certificate_-b_amqps_..localhost_5671
Failed: ConnectionError - [SSL] tlsv13 alert certificate required (_ssl.c:1946)

sos_commands/qpid/qpid-stat_-q
Failed: AuthenticationFailure - Anonymous connections disabled, missing credentials


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

File "qpid-stat_-q_--ssl-certificate_-b_amqps_..localhost_5671" appears to have stopped showing useful content around Satellite version 6.10.

File "qpid-stat_-q" appears to have shown only errors since at least Satellite 6.2.




How reproducible:

100%


Steps to Reproduce:
1.  collect and extract an sosreport for a Satellite server
2.  # cat sos_commands/katello/qpid-stat_-q_--ssl-certificate* 2>/dev/null || cat sos_commands/pulp/qpid-stat_-q_--ssl-certificate*
3.  # cat sos_commands/qpid/qpid-stat_-q

Actual results:

only errors can be found in file "sos_commands/pulp/qpid-stat_-q_--ssl-certificate_-b_amqps_..localhost_5671"


Expected results:

the output should look something like this:

Queues
  queue                                                      dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  ==========================================================================================================================================
  8d109ce4-865d-4918-8a8a-15f5fcaeeae5:0.0                        Y        Y        0     0      0       0      0        0         1     2
  celery                                                     Y                      0     0      0       0      0        0         0     2
  katello.agent                                              Y                      0     0      0       0      0        0         0     1
  reserved_resource_worker-0.redhat.com.dq2  Y                      0     0      0       0      0        0         0     2
  reserved_resource_worker-1.redhat.com.dq2  Y                      0     0      0       0      0        0         0     2
  reserved_resource_worker-2.redhat.com.dq2  Y                      0     0      0       0      0        0         0     2
  reserved_resource_worker-3.redhat.com.dq2  Y                      0     0      0       0      0        0         0     2
  resource_manager                                           Y                      0     0      0       0      0        0         0     2
  resource_manager.redhat.com.dq2            Y                      0     0      0       0      0        0         0     2


Additional info:

I ran some manual commands for comparison.  This command appears to work in Satellite versions 6.2 through 6.12:

# MYHOST=`hostname -f`;qpid-stat -b amqps://localhost:5671 -q --ssl-certificate="/etc/pki/katello/private/$MYHOST-foreman-proxy-client-bundle.pem" --sasl-mechanism=ANONYMOUS

This command appears to have stopped working in Satellite 6.11:

# MYHOST=`hostname -f`;qpid-stat -b amqps://localhost:5671 -q --ssl-certificate="/etc/pki/katello/private/$MYHOST-foreman-proxy-client-bundle.pem"


This command started working in Satellite 6.6, but appears to have stopped working in version 6.11:

# qpid-stat -q --ssl-certificate /etc/pki/pulp/qpid/client.crt -b amqps://localhost:5671


This command doesn't appear to have worked since (at the latest) Satellite 6.2 on RHEL 7:

# qpid-stat -q -b amqps://localhost:5671

Comment 5 Pavel Moravec 2022-12-05 07:54:47 UTC
Good investigation!

Technically, a better certificate (with its key) in the whole command would be

qpid-stat -b amqps://localhost:5671 -q --ssl-certificate=/etc/pki/katello/qpid_router_client.crt --ssl-key=/etc/pki/katello/qpid_router_client.key --sasl-mechanism=ANONYMOUS

since that is the way how qdrouterd establishes connection to qpidd. The foreman-proxy-client bundle rather seems to work by a "coincidence". At least this works well on Sat6.9 on RHEL7 as well as on Sat6.12 on RHEL8.

Please confirm if this works well for you.


Now, where & when to fix it:
- definitely it is worth fixing it in upstream
- with the RHEL7 release phase (plus Sat6 slowly stopping to be supported on RHEL7), I am not sure if it is worth of z-stream (where we dont have capacity in QE for an errata - maybe for a HF? we will discuss this in a program call)
- in RHEL8 (or RHEL9), it would get backported in several months the soonest, when katello-agent wont be much supported (I still do see it in 6.12 where we can use MQTT push also, not sure about precise deadline of qpidd(*) in Sat6). Still worth having it, just the importance is not so high.

(*) R.I.P. my favourite piece of Satellite :)

Comment 6 Pavel Moravec 2023-05-25 15:18:53 UTC
I created https://github.com/sosreport/sos/pull/3251 for sos upstream. It will land in RHEL8/9 in a very few months. BUT no plans to backport it to RHEL7 (due to the maintenance mode of RHEL7 and soon movement of Sat6 supported on RHEL8 only).

Therefore I am reassigning the BZ to RHEL8.

Comment 15 errata-xmlrpc 2023-06-26 13:55:53 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 (sos bug fix and enhancement update), 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-2023:3801


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