Bug 2100154
| Summary: | sos yum dnf cleanup | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | jcastran |
| Component: | sos | Assignee: | Pavel Moravec <pmoravec> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Miroslav Hradílek <mhradile> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.6 | CC: | agk, bmr, jhunsaker, mhradile, plambri, pmoravec, sbradley, theute |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | sos-4.4-2.el8 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-03-16 21:35:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 (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. 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. 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. 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) (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. (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. 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 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 ? 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 (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. 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. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days |
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