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 1827801 - rebase to sos 4 in RHEL8.4
Summary: rebase to sos 4 in RHEL8.4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: 8.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 8.0
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks: 1894575
TreeView+ depends on / blocked
 
Reported: 2020-04-24 20:09 UTC by Pavel Moravec
Modified: 2021-05-18 14:48 UTC (History)
6 users (show)

Fixed In Version: sos-4.0-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:47:21 UTC
Type: Enhancement
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pavel Moravec 2020-04-24 20:09:08 UTC
Description of problem:
sos 4.0 will be an evolution step in the sos project, that (upon other traditional types of improvements):
- adds a new command layer on the top of sosreport, such that today's sosreport becomes "sos report"
- integrates sos-collector natively under the sos umbrella as "sos collect"
- possible other sub-commands might be implemented (compare, clean)

We should reflect those changes in downstream RHEL8 as well. Depending on particular timing, we might be able rebase to sos 4.[0-2].

Filing this rebase BZ this way soon to let everybody (incl. QE) to prepare for the bigger change.


Version-Release number of selected component (if applicable):
sos-3.*


How reproducible:
100%


Steps to Reproduce:
1. rpm -q sos
2. sos report
3. sos collect
4. sos has weak dependency (Recommends) on python3-pexpect required to have "sos collect" functional
5. sos newly obsoletes sos-collector


Actual results:
1. sos-3.*
2. and 3.: neither works today


Expected results:
1. sos-4.*
2. and 3.: both provide expected functionality, while "sosreport" is an acronym of "sos report" with a deprecation warning message


Additional info:

Comment 5 Miroslav Hradílek 2021-01-28 15:30:11 UTC
Verified manually on RHEL-8.3.0 x86_64.

Old:
====
1)
# rpm -q sos
sos-3.9.1-6.el8.noarch

2)
# sos report
-bash: /usr/sbin/sos: No such file or directory

4)
# rpm -q --recommends sos
#

5)
# rpm -q --obsoletes sos
#

3)
# sos collect
-bash: /usr/sbin/sos: No such file or directory

6)
# sos clean
-bash: /usr/sbin/sos: No such file or directory

New:
====
1)
# rpm -q sos
sos-4.0-6.el8.noarch

2)
# sos report
. . .
sosreport (version 4.0)
. . .
Your sosreport has been generated and saved in:
	/var/tmp/sosreport-alphahost-2021-01-28-hazirco.tar.xz
. . .

4)
# rpm -q --recommends sos
python3-pexpect

5)
# rpm -q --obsoletes sos
sos-collector

# rpm -q sos sos-collector
sos-3.9.1-6.el8.noarch
sos-collector-1.8-2.el8.noarch

# yum install sos-4.0-6.el8.noarch.rpm
. . .
Upgrading:
 sos                    noarch                    4.0-6.el8                     @commandline                    686 k
     replacing  sos-collector.noarch 1.8-2.el8
. . .
# rpm -q sos sos-collector
sos-4.0-6.el8.noarch
package sos-collector is not installed

3) // sos collect
# ssh-keygen -t rsa -f $HOME/.ssh/id_rsa -N ''
# ssh-copy-id root@betahost
# hostname
alphahost
# sos collect --cluster-type jbon --node betahost
. . .
sos-collector (version 4.0)
. . .
Please enter the case id you are collecting reports for: 111
. . .
The following is a list of nodes to collect from:
	alphahost
	betahost
. . .
Beginning collection of sosreports from 2 nodes, collecting a maximum of 4 concurrently

alphahost  : Generating sosreport...
betahost  : Generating sosreport...
betahost  : Retrieving sosreport...
betahost  : Successfully collected sosreport
alphahost  : Retrieving sosreport...
alphahost  : Successfully collected sosreport

The following archive has been created. Please provide it to your support team.
	/var/tmp/sos-collector-111-2021-01-28-kxebq.tar.xz

# tar -tf /var/tmp/sos-collector-111-2021-01-28-kxebq.tar.xz
sos-collector-111-2021-01-28-kxebq/
sos-collector-111-2021-01-28-kxebq/sos_logs/
sos-collector-111-2021-01-28-kxebq/sos_logs/sos.log
sos-collector-111-2021-01-28-kxebq/sos_logs/ui.log
sos-collector-111-2021-01-28-kxebq/sosreport-alphahost-111-2021-01-28-zafkfcr.tar.xz
sos-collector-111-2021-01-28-kxebq/checksums/
sos-collector-111-2021-01-28-kxebq/checksums/sosreport-alphahost-111-2021-01-28-zafkfcr.tar.xz.md5
sos-collector-111-2021-01-28-kxebq/checksums/sosreport-betahost-111-2021-01-28-hvmotlt.tar.xz.md5
sos-collector-111-2021-01-28-kxebq/sosreport-betahost-111-2021-01-28-hvmotlt.tar.xz
sos-collector-111-2021-01-28-kxebq/sos_reports/
sos-collector-111-2021-01-28-kxebq/sos_reports/manifest.json
# tar -xf /var/tmp/sos-collector-111-2021-01-28-kxebq.tar.xz

# tar -tf sos-collector-111-2021-01-28-kxebq/sosreport-alphahost-111-2021-01-28-zafkfcr.tar.xz  | grep /etc/hostname
sosreport-alphahost-111-2021-01-28-zafkfcr/etc/hostname
# tar -xf sos-collector-111-2021-01-28-kxebq/sosreport-alphahost-111-2021-01-28-zafkfcr.tar.xz
# cat sosreport-alphahost-111-2021-01-28-zafkfcr/etc/hostname
alphahost


# tar -tf sos-collector-111-2021-01-28-kxebq/sosreport-betahost-111-2021-01-28-hvmotlt.tar.xz  | grep /etc/hostname
sosreport-betahost-111-2021-01-28-hvmotlt/etc/hostname
# tar -xf sos-collector-111-2021-01-28-kxebq/sosreport-betahost-111-2021-01-28-hvmotlt.tar.xz
# cat sosreport-betahost-111-2021-01-28-hvmotlt/etc/hostname
betahost

I also successfully tried:
# sos collect --cluster-type jbon --node betahost -o host --batch

and options propagated.

6) // sos clean
# sos report -o host --batch
. . .
# tar -tf /var/tmp/sosreport-alphahost-2021-01-28-gvcctqq.tar.xz | grep hostname
sosreport-alphahost-2021-01-28-gvcctqq/sos_commands/host/hostname
sosreport-alphahost-2021-01-28-gvcctqq/sos_commands/host/hostname_-f
sosreport-alphahost-2021-01-28-gvcctqq/sos_commands/host/hostnamectl_status
sosreport-alphahost-2021-01-28-gvcctqq/hostname
# tar -xf /var/tmp/sosreport-alphahost-2021-01-28-gvcctqq.tar.xz
# cat sosreport-alphahost-2021-01-28-gvcctqq/sos_commands/host/hostname
alphahost

# sos clean /var/tmp/sosreport-alphahost-2021-01-28-gvcctqq.tar.xz
. . .
sos clean (version 4.0)
. . .
[cleaner] Could not update mapping config file: [Errno 2] No such file or directory: '/etc/sos/cleaner/default_mapping'
A mapping of obfuscated elements is available at
	/var/tmp/sosreport-host0-2021-01-28-gvcctqq-private_map

The obfuscated archive is available at
	/var/tmp/sosreport-host0-2021-01-28-gvcctqq-obfuscated.tar.xz
. . .
# tar -tf /var/tmp/sosreport-host0-2021-01-28-gvcctqq-obfuscated.tar.xz | grep hostname
sosreport-host0-2021-01-28-gvcctqq/sos_commands/host/hostname
sosreport-host0-2021-01-28-gvcctqq/sos_commands/host/hostname_-f
sosreport-host0-2021-01-28-gvcctqq/sos_commands/host/hostnamectl_status
sosreport-host0-2021-01-28-gvcctqq/hostname
# tar -xf /var/tmp/sosreport-host0-2021-01-28-gvcctqq-obfuscated.tar.xz
# cat sosreport-host0-2021-01-28-gvcctqq/sos_commands/host/hostname
host0.obfuscateddomain1.com

I also tried on unpacked dir and it worked the same:
# sos clean sosreport-alphahost-17-2021-01-28-gvcctqq
. . .
# cat /var/tmp/sosreport-host0-2021-01-28-gvcctqq/hostname 
host0.obfuscateddomain1.com

Comment 7 errata-xmlrpc 2021-05-18 14:47:21 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-2021:1604


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