RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2002333 - sosreport syspurpose information not collected in 9
Summary: sosreport syspurpose information not collected in 9
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: sos
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.0
Assignee: Pavel Moravec
QA Contact: Upgrades and Supportability
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-08 15:01 UTC by Miroslav Hradílek
Modified: 2022-11-15 12:54 UTC (History)
7 users (show)

Fixed In Version: sos-4.3-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 11:12:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 2681 0 None None None 2021-09-09 07:07:22 UTC
Red Hat Issue Tracker RHELPLAN-96567 0 None None None 2021-09-08 15:02:00 UTC
Red Hat Product Errata RHEA-2022:8275 0 None None None 2022-11-15 11:12:38 UTC

Description Miroslav Hradílek 2021-09-08 15:01:27 UTC
Description of problem:
There was a request (bug 1654826) in 8 to collect output of "syspurpose show".

This no longer works on 9 because syspurpose command is missing. I was told that syspurpose utility was integrated into subscription manager command.

Version-Release number of selected component (if applicable):
# rpm -q sos subscription-manager
sos-4.1-8.el9.noarch
subscription-manager-1.29.18-2.el9.aarch64

How reproducible:
100%

Steps to Reproduce:
1. sosreport -o subscription_manager --batch
2. tar -tf /var/tmp/sosreport-archive.tar.xz | grep syspurpose_show


Actual results:
Not collected

Expected results:
sosreport-archive/sos_commands/subscription_manager/subscription-manager_syspurpose_--show

Additional info:
Bellow change should fix this to work in both cases (old and new way).

# diff -u /usr/lib/python3.9/site-packages/sos/report/plugins/subscription_manager.py subscription_manager.py 
--- /usr/lib/python3.9/site-packages/sos/report/plugins/subscription_manager.py	2021-02-25 13:46:49.000000000 -0500
+++ subscription_manager.py	2021-09-08 10:33:33.188012366 -0400
@@ -35,7 +35,8 @@
             "subscription-manager identity",
             "subscription-manager release --show",
             "subscription-manager release --list",
-            "syspurpose show"
+            "syspurpose show",
+            "subscription-manager syspurpose --show"
         ])
         self.add_cmd_output("rhsm-debug system --sos --no-archive "
                             "--no-subscriptions --destination %s"

I also noticed that there are several syspurpose.json files collected by the plugin. Not sure if there is a difference between those and syspurpose command output. Was not with my empty (and mocked) syspurpose.
sosreport-archive/etc/rhsm/syspurpose/syspurpose.json
sosreport-archive/var/lib/rhsm/cache/syspurpose.json

Comment 1 Pavel Moravec 2021-09-09 07:07:22 UTC
(This does not explicitly need to backport to backport to RHEL8.6 where "the old syspurpose way" work, but the fix will land there either way to have sos package in par with 9.0 GA)

Good catch, https://github.com/sosreport/sos/pull/2681 raised.

The config files shall by default contain the same data as the syspurpose command collects, though I bet there are use cases where the cmdoutput and configs differ and we must collect both.

Comment 11 Pavel Moravec 2022-03-16 11:47:58 UTC
This will be in 9.1 due to inclusion in sos-4.3 that we will rebase to.

Comment 12 Pavel Moravec 2022-03-18 08:25:10 UTC
(no need to clone to 8.7 as this is rhel9 specific only)

Comment 14 Maros Kopec 2022-04-08 11:50:30 UTC
The automated test /CoreOS/sos/Sanity/plugin-subscription-manager  passed with new build sos-4.3-1.el9

Comment 22 errata-xmlrpc 2022-11-15 11:12:24 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/RHEA-2022:8275


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