Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1139147

Summary: listing of products using API/CLI is generally slow and leads to timeouts
Product: Red Hat Satellite Reporter: Lukas Pramuk <lpramuk>
Component: APIAssignee: Dustin Tsang <dtsang>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: achan, bbuckingham, cwelton, mmccune, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, listing products using API/CLI was slow and lead to timeouts. This issue has been fixed in this release.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-13 22:29:04 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:

Description Lukas Pramuk 2014-09-08 08:34:03 UTC
Description of problem:
Listing of products using API/CLI is generally slow. Listing of 90 products using API call GET /katello/api/organizations/<orgid>/products takes approx. 30-40 secs. (less than 3 items per sec :-/)

On slower machines or machines under the load it can take longer. So after reaching 60secs, the API call simply timeouts!

Kinda blocker this way to Transition Tooling, You cannot import repositories and content-views then.

Version-Release number of selected component (if applicable):
6.0.4-GA-RC2

How reproducible:
slowness 100%, timeouts on slower machines only

Steps to Reproduce:
0. have 90 or more products within organization with id <orgid>
1a. use api call GET /katello/api/organizations/<orgid>/products

or

1b. hammer -d product list --organization-id <orgid> --per-page 100 

Actual results:
slow so it can lead to timeouts 

Expected results:
faster, no timeouts

Comment 1 RHEL Program Management 2014-09-08 08:43:07 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 jcallaha 2014-10-17 17:14:07 UTC
Average run-times for listing 100 products is approximately 14-16 seconds.

*** This bug is verified in upstream.  This fix should eventually land in future downstream builds ***

# rpm -qa | grep foreman
foreman-release-1.7.0-0.develop.201410150839gitb948163.el6.noarch
foreman-gce-1.7.0-0.develop.201410150839gitb948163.el6.noarch
foreman-selinux-1.7.0-0.develop.201409301113git2f345de.el6.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-2.201409091410gitc96619d.git.0.37f3704.el6.noarch
qe-foreman-rhel65.usersys.redhat.com-foreman-proxy-1.0-1.noarch
foreman-postgresql-1.7.0-0.develop.201410150839gitb948163.el6.noarch
qe-foreman-rhel65.usersys.redhat.com-qpid-broker-1.0-1.noarch
qe-foreman-rhel65.usersys.redhat.com-qpid-client-cert-1.0-1.noarch
foreman-1.7.0-0.develop.201410150839gitb948163.el6.noarch
foreman-ovirt-1.7.0-0.develop.201410150839gitb948163.el6.noarch
foreman-vmware-1.7.0-0.develop.201410150839gitb948163.el6.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6.noarch
ruby193-rubygem-foreman_discovery-1.4.0-0.1.rc4.el6.noarch
rubygem-hammer_cli_foreman-0.1.3-1.201410151235gitbc8c449.el6.noarch
ruby193-rubygem-foreman_bootdisk-4.0.0-1.el6.noarch
foreman-proxy-1.7.0-0.develop.201410101404git7961640.el6.noarch
qe-foreman-rhel65.usersys.redhat.com-puppet-client-1.0-1.noarch
qe-foreman-rhel65.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-foreman-rhel65.usersys.redhat.com-apache-1.0-1.noarch
qe-foreman-rhel65.usersys.redhat.com-parent-cert-1.0-1.noarch
foreman-compute-1.7.0-0.develop.201410150839gitb948163.el6.noarch
ruby193-rubygem-foreman-tasks-0.6.10-1.el6.noarch
foreman-libvirt-1.7.0-0.develop.201410150839gitb948163.el6.noarch

Comment 5 jcallaha 2014-11-13 16:17:42 UTC
*** VERIFIED in zstream ***

Average run times
-----------------
RHEL 65 - 15s
RHEL 66 - 13s
RHEL  7 -  7s

ruby193-rubygem-foreman-tasks-0.6.9-1.1.el7sat.noarch
foreman-gce-1.6.0.49-1.el7sat.noarch
cloud-qe-9.idmqe.lab.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3-3.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.1-16.el7sat.noarch
foreman-selinux-1.6.0.15-1.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-2.0.6-1.1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.0.4-2.el7sat.noarch
foreman-ovirt-1.6.0.49-1.el7sat.noarch
ruby193-rubygem-foreman_discovery-1.3.0-2.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.5-2.el7sat.noarch
foreman-vmware-1.6.0.49-1.el7sat.noarch
foreman-proxy-1.6.0.30-1.el7sat.noarch
cloud-qe-9.idmqe.lab.eng.bos.redhat.com-foreman-client-1.0-1.noarch
foreman-1.6.0.49-1.el7sat.noarch
foreman-compute-1.6.0.49-1.el7sat.noarch
foreman-postgresql-1.6.0.49-1.el7sat.noarch
foreman-libvirt-1.6.0.49-1.el7sat.noarch

Comment 7 errata-xmlrpc 2014-11-13 22:29:04 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://access.redhat.com/errata/RHBA-2014:1857