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 1688369

Summary: Errata search with available_for option ignores pagination
Product: Red Hat Satellite Reporter: Pavel Moravec <pmoravec>
Component: Errata ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Akhil Jha <akjha>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4.2Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-09 17:02:24 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 Pavel Moravec 2019-03-13 15:54:36 UTC
Description of problem:

Summary says it all, particular example  -see reproducer.


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


How reproducible:
100%


Steps to Reproduce:
1. Have many errata that apply to some filter in a CV
2. Find the CV filter ID - it will be 1st column in output:
su - postgres -c "psql foreman -c \"select * from katello_content_view_filters;\""

3. Having the filter id stored in bash variable ID, run the query:

curl -X GET -s -k -u admin:verysecretpassword "https://$(hostname -f)/katello/api/v2/errata?available_for=content_view_filter&filterId=${ID}&full_result=true&page=1&paged=true&per_page=30&search=&sort_by=issued&sort_order=DESC" > errata_available_for_${ID}.json

4. Check real pagination settings of the query:

cat errata_available_for_${ID}.json | python -m json.tool | grep "[\"_]page\""


Actual results:
Regardless what pagination one sets in "per_page" (or I guess also in "page") in the URI request, the output will have:

    "page": "1",
    "per_page": 9496,

(where the per_page value will match exactly the number of errata returned - "grep -c errata_id" will return the same)



Expected results:
page and per_page is applied properly


Additional info:
The query itself is quite imperformant - long postgres SELECT taking much CPU is run for a loong time (12min on a customer DB on idle Satellite). Not sure if worth improving that as well..?

Comment 3 Brad Buckingham 2019-03-25 19:38:09 UTC
related bug 1688364

Comment 4 Mike McCune 2021-06-08 21:14:45 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 5 Mike McCune 2021-07-09 17:02:24 UTC
Thank you for your interest in Satellite 6. 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.