Bug 600813 - [RFE] capture complete list of yum repositories in sosreport
Summary: [RFE] capture complete list of yum repositories in sosreport
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sos
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Keith Robertson
QA Contact: David Kutálek
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-06 06:33 UTC by Stefan Markovic
Modified: 2016-07-04 01:33 UTC (History)
9 users (show)

Fixed In Version: 2.2-9.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2011-12-06 18:10:17 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1536 normal SHIPPED_LIVE Low: sos security, bug fix, and enhancement update 2011-12-06 01:02:03 UTC

Description Stefan Markovic 2010-06-06 06:33:49 UTC
Is it possible that in RHEL  6 in default sosreport we get complete list of repositories so we can see if customer is using some unofficial repository that could lead to braking of yum during updates.
And bash history of root, so technical support can see commands that lead to error we are trying to fix.

Comment 2 Siddharth Nagar 2010-11-16 02:14:45 UTC
Adam, what do you think? Seems reasonable to me.

Comment 3 Pierre Carrier 2010-12-01 17:09:13 UTC
Would the current approach upstream work for you?

In installed-rpms, we get the output of:
/bin/rpm -qa --qf="%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\t%{INSTALLTIME}\t%{VENDOR}\n" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-60s%s\\n\",$1,$2}'|sort
(this does not break checksysreport)

We also have:
        if self.policy().rhelVersion() == 5:
            if len(os.listdir("/etc/yum.repos.d/")):
                self.addAlert("/etc/yum.repos.d/ contains additional repository "+
                                 "information and can cause rpm conflicts.")

I'd be happy to replace this with the inclusion of /etc/yum.repos.d/ to the sosreport.

Comment 4 Pierre Carrier 2010-12-01 17:12:58 UTC
Sorry, posted too fast.

We already copy /etc/yum, /etc/yum.repos.d, /etc/yum.conf upstream.


Comment 5 Bryn M. Reeves 2010-12-01 17:44:48 UTC
Re-assigning as Adam's no longer working on SoS.

Comment 8 Bryn M. Reeves 2011-04-21 13:06:13 UTC
afaik the yum-rhn-plugin does not use files in /etc/yum.repos.d so I think we either need to run another command or look elsewhere for this data (although we do also need the /etc/yum* files to but afaik they are already being collected).

I'll ask an rhn person to chime in here.

Comment 9 Bryn M. Reeves 2011-08-12 11:07:55 UTC
There is code in sos-2.2 to attempt to collect this output but it's not enabled by default and the option is broken:

    optionList = [("yumlist", "list repositories and packages", "slow", False)]
    optionList = [("yumdebug", "gather yum debugging data", "slow", False)]

This attempts to add two options to the class but ends up redefining optionList (only yumdebug is added) so you get:

# sosreport -k yum.yumlist=True

sosreport (version 2.2)

no such option "yumlist" for plugin (yum)

Fix for this is trivial but still leaves the option disabled by default (it's marked "slow", False). With older yum versions I think this was valid but in my testing with RHEL/yum-rhn-plugin repos I think this is fast enough to enable by default. We can also pass yum --cacheonly to try to prevent updating cached metadata.

Comment 10 Bryn M. Reeves 2011-08-12 11:11:31 UTC
OK, I'll leave yumlist as an option to control collecting output of "yum list" as even with -C this is going to be slow on a machine with stale cache and move the repo listing to default.

Comment 11 Bryn M. Reeves 2011-08-12 11:37:13 UTC
# cat seg2-2011081212581313150309/sos_commands/yum/yum_-C_repolist
Loaded plugins: auto-update-debuginfo, post-transaction-actions, rhnplugin
Found 1 installed debuginfo package(s)
Enabling epel-debuginfo: Extra Packages for Enterprise Linux 6 - x86_64 - Debug
Reading repository metadata in from local files
repo id                                 repo name                         status
epel                                    Extra Packages for Enterprise Lin 6,237
epel-debuginfo                          Extra Packages for Enterprise Lin 1,359
rhel-x86_64-server-6                    Red Hat Enterprise Linux Server ( 5,215
rhel-x86_64-server-6-debuginfo          RHEL Server Debuginfo (v.6 for x8 2,222
rhel-x86_64-server-ha-6                 RHEL Server High Availability (v.    93
rhel-x86_64-server-ha-6-debuginfo       RHEL Server High Availability Deb    50
rhel-x86_64-server-optional-6           RHEL Server Optional (v. 6 64-bit 3,549
rhel-x86_64-server-optional-6-debuginfo RHEL Server Optional Debuginfo (v 1,334
rhel-x86_64-server-rs-6                 RHEL Server Resilient Storage (v.   107
rhel-x86_64-server-rs-6-debuginfo       RHEL Server Resilient Storage Deb    58
rhel-x86_64-server-sfs-6                RHEL Server Scalable File System      7
rhel-x86_64-server-sfs-6-debuginfo      RHEL Server Scalable FS Debuginfo     3
repolist: 20,234

Comment 12 Bryn M. Reeves 2011-08-12 11:38:33 UTC
with -kyum.yumlist=True:

# wc -l seg2-2011081213021313150530/sos_commands/yum/yum_list
18059 seg2-2011081213021313150530/sos_commands/yum/yum_list
[root@seg2 tmp]# head seg2-2011081213021313150530/sos_commands/yum/yum_list; tail seg2-2011081213021313150530/sos_commands/yum/yum_list

# head seg2-2011081213021313150530/sos_commands/yum/yum_list; tail seg2-2011081213021313150530/sos_commands/yum/yum_list
Loaded plugins: auto-update-debuginfo, post-transaction-actions, rhnplugin
Found 1 installed debuginfo package(s)
Enabling epel-debuginfo: Extra Packages for Enterprise Linux 6 - x86_64 - Debug
Reading repository metadata in from local files
Installed Packages
ConsoleKit.x86_64               0.4.1-3.el6       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
ConsoleKit-libs.x86_64          0.4.1-3.el6       @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
GConf2.x86_64                   2.28.0-6.el6      @rhel-x86_64-server-6         
MAKEDEV.x86_64                  3.24-6.el6        @anaconda-RedHatEnterpriseLinux-201009221801.x86_64/6.0
ORBit2.x86_64                   2.14.17-3.1.el6   @rhel-x86_64-server-6         
znc.x86_64                      0.098-2.el6       epel                          
znc-debuginfo.x86_64            0.098-2.el6       epel-debuginfo                
znc-devel.i686                  0.098-2.el6       epel                          
znc-devel.x86_64                0.098-2.el6       epel                          
znc-extra.x86_64                0.098-2.el6       epel                          
znc-modperl.x86_64              0.098-2.el6       epel                          
znc-modtcl.x86_64               0.098-2.el6       epel                          
zsh.x86_64                      4.3.10-4.1.el6    rhel-x86_64-server-6          
zsh-debuginfo.x86_64            4.3.10-4.1.el6    rhel-x86_64-server-6-debuginfo
zsh-html.x86_64                 4.3.10-4.1.el6    rhel-x86_64-server-optional-6

Comment 15 errata-xmlrpc 2011-12-06 18:10:17 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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