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 1420503 - Hammer does not list over 20 items per page, ignores config file
Summary: Hammer does not list over 20 items per page, ignores config file
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API - Content
Version: 6.2.7
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
: 1303077 (view as bug list)
Depends On:
Blocks: 1425053
TreeView+ depends on / blocked
 
Reported: 2017-02-08 20:06 UTC by Taft Sanders
Modified: 2021-06-10 11:55 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1425053 (view as bug list)
Environment:
Last Closed: 2017-09-18 15:25:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 18470 0 Normal Closed Hammer does not list over 20 item per page for some resources 2020-06-22 18:56:56 UTC

Description Taft Sanders 2017-02-08 20:06:10 UTC
Description of problem:
Hammer does not list more than 20 items when trying to query something with more than 20 items.


Version-Release number of selected component (if applicable):
Satellite 6.2.7
tfm-rubygem-hammer_cli-0.5.1.12-1.el7sat.noarch

How reproducible:
everytime

Steps to Reproduce:
1.Create 21 lifecycle environments
2.list all LCE with hammer
3.--page and --per-page options don't work

Actual results:
// 21 lifecycles in the environment
[root@sat62 ~]# hammer -p redhat lifecycle-environment list --organization-id=1 
---|---------|--------
ID | NAME    | PRIOR  
---|---------|--------
1  | Library |        
22 | lfc_21  | Library
21 | lfc_20  | Library
20 | lfc_19  | Library
19 | lfc_18  | Library
18 | lfc_17  | Library
17 | lfc_16  | Library
16 | lfc_15  | Library
15 | lfc_14  | Library
14 | lfc_13  | Library
13 | lfc_12  | Library
12 | lfc_11  | Library
11 | lfc_10  | Library
10 | lfc_09  | Library
9  | lfc_08  | Library
8  | lfc_07  | Library
7  | lfc_06  | Library
6  | lfc_05  | Library
5  | lfc_04  | Library
4  | lfc_03  | Library
---|---------|--------
Page 1 of 2 (use --page and --per-page for navigation)
[root@sat62 ~]#

// It's not possible to see the flags --per-page or --page
[root@sat62 ~]# hammer -p redhat lifecycle-environment list --organization-id=1 --help
Usage:
    hammer lifecycle-environment list [OPTIONS]

Options:
 --library LIBRARY                       set true if you want to see only library environments
                                         Possible value(s): 'true', 'false'
 --name NAME                             filter only environments containing this name
 --organization ORGANIZATION_NAME        Organization name to search by
 --organization-id ORGANIZATION_ID       organization ID
 --organization-label ORGANIZATION_LABEL Organization label to search by
 -h, --help                              print help
[root@sat62 ~]#

// Trying to use --page flag
[root@sat62 ~]# hammer -p redhat lifecycle-environment list --organization-id=1 --page
Error: Unrecognised option '--page'

See: 'hammer lifecycle-environment list --help'
[root@sat62 ~]#

// Trying to use --per-page flag
[root@sat62 ~]# hammer -p redhat lifecycle-environment list --organization-id=1 --per-page
Error: Unrecognised option '--per-page'

See: 'hammer lifecycle-environment list --help'
[root@sat62 ~]#


Expected results:
--page --per-page options should work

Additional info:

Comment 3 Tomas Strachota 2017-02-13 11:18:25 UTC
Created redmine issue http://projects.theforeman.org/issues/18470 from this bug

Comment 4 Satellite Program 2017-02-13 13:17:13 UTC
Upstream bug assigned to tstrachota

Comment 5 Tomas Strachota 2017-02-13 13:59:18 UTC
The issue is caused by missing search params in the apidoc for lifecycle environment index action. Hammer detects when the pagination options are present and tries to iterate over the pages to get full results. If the options are missing, it assumes there's no pagination. So the issue is server side.

Adding this should fix it:

  param_group :search, Api::V2::ApiController

There's multiple resources in Katello's api that seem to be affected (I tried to grep for this param group in the controller files) so fixing this deserves checking the whole API.

Comment 6 Satellite Program 2017-03-10 21:16:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18470 has been resolved.

Comment 7 Anand Agrawal 2017-04-25 06:03:35 UTC
*** Bug 1303077 has been marked as a duplicate of this bug. ***

Comment 9 Bryan Kearney 2017-09-18 15:25:34 UTC
I do not see these being backported into 6.2.z. There are clones tracking these issues for other versions of satellite.

Comment 10 Trey Prinz 2017-11-09 22:02:25 UTC
Is there a chance of getting this backported into 6.2.z or will this be in 6.3 (CPS Energy is asking for this).  Thanks.


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