Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ 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
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.
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