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 2100154 - sos yum dnf cleanup
Summary: sos yum dnf cleanup
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: 8.6
Hardware: All
OS: All
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-22 14:55 UTC by jcastran
Modified: 2023-09-18 04:39 UTC (History)
8 users (show)

Fixed In Version: sos-4.4-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-16 21:35:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 2903 0 None Merged [dnf,yum] Merge plugins into dnf, remove yum plugin 2022-06-23 10:35:53 UTC
Github sosreport sos pull 3031 0 None open [dnf] Collect legacy yum config and dnf global vars 2022-09-20 20:30:00 UTC
Red Hat Issue Tracker RHELPLAN-126002 0 None None None 2022-06-22 15:12:47 UTC

Description jcastran 2022-06-22 14:55:12 UTC
Sos report treats yum and dnf as separate commands, collecting 2 sets of information. Some of this is duplicates, while others don't know the 2 directories exist.

* sos_commands/yum should be a link to sos_commands/dnf

  This will put all the commands in one directory so engineers won't forget to look in both locations.

   # ls -l /usr/bin/yum
     lrwxrwxrwx. 1 root root 5 Mar 18 11:21 /usr/bin/yum -> dnf-3

* Instead of grabbing a specific package with: "dnf_--assumeno_list_installed_dnf", lets grab "dnf list --installed" and get a full listing of the installed packages. 

* remove "--assumeno" from all the commands. It's really not necessary as there is no "y/n" prompt from any of these commands:

=======================================
Old List of commands
=======================================
# cd sos_commands
# tree dnf yum/
dnf
├── dnf_--assumeno_list_extras
├── dnf_--assumeno_list_installed_dnf
├── dnf_--assumeno_module_list
├── dnf_--assumeno_module_list_--installed
├── dnf_--version
├── package-cleanup_--dupes
└── package-cleanup_--problems
yum/
├── package-cleanup_--dupes
├── package-cleanup_--problems
├── yum_-C_repolist
├── yum_-C_repolist_--verbose
├── yum_history
└── yum_list_installed

=======================================
New Requested List
=======================================
# for i in $(ls sos_commands/dnf/); do ln -s ../dnf/$i sos_commands/yum/$(echo $i |sed 's/dnf/yum/g');done
# tree
.
├── dnf
│   ├── dnf_-C_repolist
│   ├── dnf_-C_repolist_--verbose
│   ├── dnf_history
│   ├── dnf_list_extras
│   ├── dnf_list_installed
│   ├── dnf_module_list
│   ├── dnf_module_list_--installed
│   ├── dnf_--version
│   ├── package-cleanup_--dupes
│   └── package-cleanup_--problems
└── yum
    ├── package-cleanup_--dupes -> ../dnf/package-cleanup_--dupes
    ├── package-cleanup_--problems -> ../dnf/package-cleanup_--problems
    ├── yum_-C_repolist -> ../dnf/dnf_-C_repolist
    ├── yum_-C_repolist_--verbose -> ../dnf/dnf_-C_repolist_--verbose
    ├── yum_history -> ../dnf/dnf_history
    ├── yum_list_extras -> ../dnf/dnf_list_extras
    ├── yum_list_installed -> ../dnf/dnf_list_installed
    ├── yum_module_list -> ../dnf/dnf_module_list
    ├── yum_module_list_--installed -> ../dnf/dnf_module_list_--installed
    └── yum_--version -> ../dnf/dnf_--version

- - - - - - - - - OR - - - - - - - - - 
# for i in $(ls dnf*); do ln -s $i sos_commands/dnf/$(echo $i |sed 's/dnf/yum/g');done
# tree
.
├── dnf
│   ├── dnf_-C_repolist
│   ├── dnf_-C_repolist_--verbose
│   ├── dnf_history
│   ├── dnf_list_extras
│   ├── dnf_list_installed
│   ├── dnf_module_list
│   ├── dnf_module_list_--installed
│   ├── dnf_--version
│   ├── package-cleanup_--dupes
│   ├── package-cleanup_--problems
│   ├── yum_-C_repolist -> dnf_-C_repolist
│   ├── yum_-C_repolist_--verbose -> dnf_-C_repolist_--verbose
│   ├── yum_history -> dnf_history
│   ├── yum_list_extras -> dnf_list_extras
│   ├── yum_list_installed -> dnf_list_installed
│   ├── yum_module_list -> dnf_module_list
│   ├── yum_module_list_--installed -> dnf_module_list_--installed
│   └── yum_--version -> dnf_--version
└── yum -> dnf

- - - - - - - - - OR - - - - - - - - - 
# ln -s dnf sos_commands/yum
# tree
.
├── dnf
│   ├── dnf_-C_repolist
│   ├── dnf_-C_repolist_--verbose
│   ├── dnf_history
│   ├── dnf_list_extras
│   ├── dnf_list_installed
│   ├── dnf_module_list
│   ├── dnf_module_list_--installed
│   ├── dnf_--version
│   ├── package-cleanup_--dupes
│   ├── package-cleanup_--problems
└── yum -> dnf

Comment 1 Jake Hunsaker 2022-06-22 15:03:08 UTC
In upstream, the `yum` plugin has been removed and the missing bits have been moved into the `dnf` plugin.

This will be reflected in (to-be-tagged) sos-4.4.

https://github.com/sosreport/sos/commit/8cdc77c484c12b5ecaa901c892bc5799ef468e32

Comment 2 Pavel Moravec 2022-06-23 10:35:54 UTC
(In reply to Jake Hunsaker from comment #1)
> In upstream, the `yum` plugin has been removed and the missing bits have
> been moved into the `dnf` plugin.
> 
> This will be reflected in (to-be-tagged) sos-4.4.
> 
> https://github.com/sosreport/sos/commit/
> 8cdc77c484c12b5ecaa901c892bc5799ef468e32

So by default, it will appear in RHEL8.8 / 9.2 due to a rebase to that sos version.

Comment 3 Pavel Moravec 2022-08-03 20:33:33 UTC
Hello,
sos in RHEL8.8 is expected to fix the bug.

To help sos QE resources, would you be able to verify if a candidate package does fix the bug properly?

I expect a candidate build to be ready in several weeks and there will be no rush to execute the verification.

Thanks in advance for potential cooperation.

Comment 4 jcastran 2022-08-29 11:59:31 UTC
I can check the package whenever it's available to ensure it has everything we need in that update. Just let me know when it's available please.

Comment 6 jcastran 2022-09-12 12:27:17 UTC
We don't need this command:

 sos_commands/dnf/dnf_--assumeno_list_installed_dnf

=======================================
And it would be helpful if we could remove the "--assumeno" from these commands, even if it's just from the filename.

sos_commands/dnf/
 dnf_--assumeno_list_extras
 dnf_--assumeno_module_list
 dnf_--assumeno_module_list_--installed

I am not sure why the "--assumeno" was added but it shouldn't be necessary when listing packages or modules. 

=======================================
I noticed that these are missing. 

 lrwxrwxrwx. 1 root root 12 Mar 18 11:21 /etc/yum.conf -> dnf/dnf.conf
 lrwxrwxrwx. 1 root root 14 Mar 18 11:21 /etc/yum/pluginconf.d -> ../dnf/plugins
 lrwxrwxrwx. 1 root root 11 Mar 18 11:21 /etc/yum/vars -> ../dnf/vars

As many customers are used to r7 and below, they will target the /etc/yum files and if they break the softlink and make an actual file, the issue could be identified faster if the sosreport collected the softlinks so we can confirm the links are still in place. (similar to /etc/grub2.cfg)

Comment 7 Pavel Moravec 2022-09-12 12:52:33 UTC
(In reply to jcastran from comment #6)
> We don't need this command:
> 
>  sos_commands/dnf/dnf_--assumeno_list_installed_dnf

.. as it is already contained in sos_commands/dnf/dnf_list_installed, indeed.

> 
> =======================================
> And it would be helpful if we could remove the "--assumeno" from these
> commands, even if it's just from the filename.
> 
> sos_commands/dnf/
>  dnf_--assumeno_list_extras
>  dnf_--assumeno_module_list
>  dnf_--assumeno_module_list_--installed
> 
> I am not sure why the "--assumeno" was added but it shouldn't be necessary
> when listing packages or modules. 

It was (bit paranoically) added there to ensure neither such command would be waiting for a user prompt ever, even in future possible changed behaviour of dnf (sub)command. Having a (dnf) command hung for a user interaction would mean whole plugin gets hung (until a timeout kills it).

Jaroslav, which of below commands can be *granted* as *not* requiring user prompt any time, please?

dnf module list
dnf module list --installed
dnf module info <module>
dnf list extras

?


> 
> =======================================
> I noticed that these are missing. 
> 
>  lrwxrwxrwx. 1 root root 12 Mar 18 11:21 /etc/yum.conf -> dnf/dnf.conf
>  lrwxrwxrwx. 1 root root 14 Mar 18 11:21 /etc/yum/pluginconf.d ->
> ../dnf/plugins
>  lrwxrwxrwx. 1 root root 11 Mar 18 11:21 /etc/yum/vars -> ../dnf/vars
> 
> As many customers are used to r7 and below, they will target the /etc/yum
> files and if they break the softlink and make an actual file, the issue
> could be identified faster if the sosreport collected the softlinks so we
> can confirm the links are still in place. (similar to /etc/grub2.cfg)

We can add collecting those files/symlinks for such legacy reasons, indeed.

Thanks for the review, I will provide a new package candidate in a week-ish time for a review.

Comment 8 Pavel Moravec 2022-09-20 20:30:01 UTC
(In reply to jcastran from comment #6)
>  lrwxrwxrwx. 1 root root 12 Mar 18 11:21 /etc/yum.conf -> dnf/dnf.conf
>  lrwxrwxrwx. 1 root root 14 Mar 18 11:21 /etc/yum/pluginconf.d ->
> ../dnf/plugins
>  lrwxrwxrwx. 1 root root 11 Mar 18 11:21 /etc/yum/vars -> ../dnf/vars
> 

https://github.com/sosreport/sos/pull/3031 raised for that.

Comment 10 jcastran 2022-09-23 12:22:50 UTC
The softlinks looks great.

lrwxrwxrwx. 1 root root 12 Apr  7 11:14 etc/yum.conf -> dnf/dnf.conf
lrwxrwxrwx. 1 root root 14 Mar 18  2022 etc/yum/pluginconf.d -> ../dnf/plugins
lrwxrwxrwx. 1 root root 18 Mar 18  2022 etc/yum/protected.d -> ../dnf/protected.d
lrwxrwxrwx. 1 root root 11 Mar 18  2022 etc/yum/vars -> ../dnf/vars

If we've already committed to this, so be it. But I would like to just vote for removing the assumeno's (there should be no prompts for a "yum list" command) We also already don't have this for "dnf_list_installed". And we still have the extra dnf_list_installed_dnf. 

dnf_--assumeno_list_extras              dnf_-C_repolist                         dnf_--version
dnf_--assumeno_list_installed_dnf       dnf_-C_repolist_--verbose               package-cleanup_--dupes
dnf_--assumeno_module_list              dnf_history                             package-cleanup_--problems
dnf_--assumeno_module_list_--installed  dnf_list_installed


Thanks,
John Castranio
Red Hat

Comment 11 Pavel Moravec 2022-09-24 19:10:18 UTC
Jaroslav, which of below commands can be *granted* as *not* requiring user prompt any time, please?

dnf module list
dnf module list --installed
dnf module info <module>
dnf list extras

?

Comment 14 jcastran 2022-11-08 19:08:22 UTC
Hello,

Is there anyway we can combine these or link them somehow? We have to look in two directories for what is essentially the same command. r8/r9 yum is dnf. But I only have repolist/history/list_installed in yum 

dnf has list_installed_dnf which we don't need, but does have all the module commands. These commands are required for most yum/dnf cases, having them in 2 locations does cause some engineers to request data, not realizing its just in another command directory.


sos_commands/dnf/:
total 52
-rw-r--r--. 1 root root  4094 Nov  8 12:32 dnf_--assumeno_list_extras
-rw-r--r--. 1 root root  1620 Nov  8 12:32 dnf_--assumeno_list_installed_dnf
-rw-r--r--. 1 root root 28418 Nov  8 12:32 dnf_--assumeno_module_list
-rw-r--r--. 1 root root   120 Nov  8 12:30 dnf_--assumeno_module_list_--installed
-rw-r--r--. 1 root root   329 Nov  8 12:32 dnf_--version
-rw-r--r--. 1 root root   120 Nov  8 12:33 package-cleanup_--dupes
-rw-r--r--. 1 root root   238 Nov  8 12:33 package-cleanup_--problems

sos_commands/yum/:
total 300
-rw-r--r--. 1 root root    120 Nov  8 12:35 package-cleanup_--dupes
-rw-r--r--. 1 root root    238 Nov  8 12:36 package-cleanup_--problems
-rw-r--r--. 1 root root    267 Nov  8 12:35 yum_-C_repolist
-rw-r--r--. 1 root root   1472 Nov  8 12:35 yum_-C_repolist_--verbose
-rw-r--r--. 1 root root  83132 Nov  8 12:35 yum_history
-rw-r--r--. 1 root root 204468 Nov  8 12:35 yum_list_installed

Comment 15 Pavel Moravec 2022-11-12 12:45:11 UTC
(In reply to jcastran from comment #14)
> Hello,
> 
> Is there anyway we can combine these or link them somehow? We have to look
> in two directories for what is essentially the same command. r8/r9 yum is
> dnf. But I only have repolist/history/list_installed in yum 

That is why we merged the plugins into one: https://github.com/sosreport/sos/pull/2903 (plus a few further pieces from former yum plugin were added to dnf plugin, like https://github.com/sosreport/sos/pull/3031). All of these should be in sos-4.4-4 which is the release candidate for 8.8/9.2 . Let me know if something is missing there.

Comment 21 Pavel Moravec 2023-03-16 21:35:12 UTC
Closing the bugzilla as the fix has been delivered in sos-4.5.0-1.el8 released via https://access.redhat.com/errata/RHBA-2023:1300 errata.

Comment 23 Red Hat Bugzilla 2023-09-18 04:39:55 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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