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 1116349 - call rhsm-debug with --no-subscriptions by default
Summary: call rhsm-debug with --no-subscriptions by default
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 7.1
Assignee: Bryn M. Reeves
QA Contact: David Kutálek
URL:
Whiteboard:
Depends On: 1114117
Blocks: rhsm-rhel71
TreeView+ depends on / blocked
 
Reported: 2014-07-04 09:40 UTC by Bryn M. Reeves
Modified: 2015-03-05 11:23 UTC (History)
7 users (show)

Fixed In Version: sos-3.2-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1114117
Environment:
Last Closed: 2015-03-05 11:23:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0532 0 normal SHIPPED_LIVE sos bug fix and enhancement update 2015-03-05 16:12:44 UTC

Description Bryn M. Reeves 2014-07-04 09:40:04 UTC
+++ This bug was initially created as a clone of Bug #1114117 +++

Description of problem:
Running rhsm-debug on a simple rhel7 VM installation takes around 90s:

# time rhsm-debug system --sos --no-archive --destination /var/tmp/out/
Wrote: /var/tmp/out//rhsm-debug-system-20140627-165705

real    1m26.624s
user    0m6.045s
sys     0m0.384s

This is run by default by sos and on a typical install now accounts for around 1/3rd of the total runtime:

# time sosreport -vv --batch
[...]
real    2m41.154s
user    0m57.406s
sys     0m11.706s

We really need to get this down or we'll have to make collection of the rhsm-debug data optional.

--- Additional comment from Adrian Likins on 2014-07-01 14:16:26 EDT ---


I would say to remove getSubscriptionList call from rhsm_debug. Looks like it can be huge, or almost empty depending on server permission set up. The data is potentially useful for debugging subscription issues, but not 90s worth. It's
also not used by subscription-manager directly.

Tempting to say to remove all the calls that hit the network, since theoretically that data should be available to the folks doing the troubleshooting. I don't think that is actually always the case, and it loses some of the snapshot-in-time value, but it would be quicker and simpler.

--- Additional comment from Bryan Kearney on 2014-07-02 09:00:51 EDT ---

will, go back on what said. Go ahead with removing it.

--- Additional comment from William Poteat on 2014-07-03 16:08:29 EDT ---

Added --no-subscriptions option to the rhsm-debug command

commit 68a1a418c27172c4fb851d536813f8060f4d3d1f

Comment 1 Bryan Kearney 2014-07-30 19:23:23 UTC
Acking 7.1

Comment 2 Bryn M. Reeves 2014-07-31 08:55:00 UTC
This bug should be against sos - it's to make use of the option added to rhsm-debug in bug 1114117 the default.

Comment 5 John Sefler 2014-11-21 21:16:45 UTC
Testing sos version...
[root@jsefler-os7 ~]# rpm -q sos
sos-3.2-7.el7.noarch

[root@jsefler-os7 ~]# rpm -ql sos-3.2-7.el7.noarch | grep yum.py
/usr/lib/python2.7/site-packages/sos/plugins/yum.py
/usr/lib/python2.7/site-packages/sos/plugins/yum.pyc
/usr/lib/python2.7/site-packages/sos/plugins/yum.pyo
[root@jsefler-os7 ~]# grep -A2 rhsm-debug /usr/lib/python2.7/site-packages/sos/plugins/yum.py
        self.add_cmd_output("rhsm-debug system --sos --no-archive "
                            "--no-subscriptions --destination %s"
                            % self.get_cmd_output_path())
[root@jsefler-os7 ~]# 

VERIFIED: sos appears to be calling rhsm-debug system with the new --no-subscriptions which will be much faster....



[root@jsefler-os7 ~]# subscription-manager register --serverur=https://subscription.rhn.stage.redhat.com:443/subscription
Username: qa
Password: 
The system has been registered with ID: fe276cb2-76a2-4285-98ce-c8bad57fd1b0 

[root@jsefler-os7 ~]# time rhsm-debug system --sos --no-archive --destination /tmp/test
Wrote: /tmp/test/rhsm-debug-system-20141121-269017

real	0m13.244s
user	0m1.363s
sys	0m0.162s

[root@jsefler-os7 ~]# time rhsm-debug system --sos --no-archive --no-subscriptions --destination /tmp/test
Wrote: /tmp/test/rhsm-debug-system-20141121-884360

real	0m3.360s
user	0m0.732s
sys	0m0.138s
[root@jsefler-os7 ~]# 

VERIFIED: A call to rhsm-debug system with the new --no-subscription option against a system registered to the stage environment took 3 seconds versus 13 seconds without the --no-subscription option.

Comment 8 errata-xmlrpc 2015-03-05 11:23:25 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.

https://rhn.redhat.com/errata/RHBA-2015-0532.html


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