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 2073165

Summary: GET request on /api/fact_values and /api/hosts/:host_id/facts shows no results if using per_page=all in Satellite 6
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: FactAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.4CC: apatel, casl, mhulan, nalfassi
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-02 17:22:44 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 Sayan Das 2022-04-07 19:37:24 UTC
Description of problem:

GET request on /api/fact_values and /api/hosts/:host_id/facts shows no results if using per_page=all but works fine if we use a positive integer i.e. per_page=10 or per_page=9999

They perhaps are part of the same underlying code as I can see both of them from https://satellite.example.com/apidoc/v2/fact_values/index.html

This problem is not present in the /api/hosts endpoint though. 

GET on /api/v2/hosts/?per_page=all and /api/v2/hosts/?per_page=10 will print exact same set of result if you have 10 systems .


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

Satellite 6.10 (all earlier versions of satellite)


How reproducible:

Always


Steps to Reproduce:
1. Install and configure a Satellite 6.10 and register a system with the same.

2. Run the following APIs against the ID of the registered system e.g. here it is 117

# curl -ku admin:password https://`hostname -f`/api/v2/hosts/117/facts?per_page=all

# curl -ku admin:password https://`hostname -f`/api/v2/hosts/117/facts?per_page=5



Actual results:

# curl -ku admin:RedHat1! https://`hostname -f`/api/v2/hosts/117/facts?per_page=all
{
  "total": 331,
  "subtotal": 0,
  "page": 1,
  "per_page": 331,
  "search": " host = 117",
  "sort": {
    "by": null,
    "order": null
  },
  "results": {}
}


# curl -ku admin:RedHat1! https://`hostname -f`/api/v2/hosts/117/facts?per_page=5
{
  "total": 331,
  "subtotal": 1,
  "page": 1,
  "per_page": 5,
  "search": " host = 117",
  "sort": {
    "by": null,
    "order": null
  },
  "results": {"rhel7.example.com":{"ansible_device_links::ids":null,"ansible_device_links::uuids":null,"ansible_device_links::masters":null,"ansible_device_links":null,"ansible_default_ipv4":null}}
}

Expected results:

The per_page=all should be able to list all the fact_names and values related to that host. 


Additional info:

There's a Redmine present already i.e. https://projects.theforeman.org/issues/31897

Comment 1 Sayan Das 2022-04-07 19:45:41 UTC
Adding to the initial request, Please check and fix all the GET API calls where "per_page=all" can be used to list all results ( as we mention this option in APIDOC ) .

Comment 2 Brad Buckingham 2023-10-04 21:43:14 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.

Comment 3 Charles Slivkoff 2023-10-04 21:58:18 UTC
DOCUMENTED features should either WORK or be REMOVED, not be ignored.

Comment 4 Brad Buckingham 2023-11-02 17:22:44 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.

Comment 5 Charles Slivkoff 2023-11-02 17:43:48 UTC
Again, this is documented.

If it is NOT functional, please indicate so in the documentation.

Thank you.