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.
Bug 1866153 - podman search doesn't add limit to a query against v2. By default v2 returns 100 items.
Summary: podman search doesn't add limit to a query against v2. By default v2 returns ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: podman
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On: 1872263
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-05 02:30 UTC by Robin Cernin
Modified: 2020-11-04 03:08 UTC (History)
12 users (show)

Fixed In Version: podman-2.0.5 or newer
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 03:06:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:4694 0 None None None 2020-11-04 03:07:47 UTC

Description Robin Cernin 2020-08-05 02:30:26 UTC
Description of problem:

Podman uses docker.SearchRegistry from older version of docker_client.go

github.com/containers/image/v5/docker/docker_client.go

Which doesn't add limit to a query against v2. By default v2 returns 100 items. 


The issue can be seen with:

curl http://localhost:5000/v2/_catalog will return 100 PerPage

VS

curl http://localhost:5000/v2/_catalog?n=1000 will return 1000 PerPage

podman search --limit 1000 doesn't add ?n=1000 to a search query and hence API always returns 100 even with limit set to 1000.


Additional info:

Latest podman from github.com

Comment 1 Tom Sweeney 2020-08-05 18:31:21 UTC
Assigning to Qi as she worked on the limit code a few months ago.  I seem to remember there being a hard limit of 100 for the registries.  Qi do you recall?  Perhaps we can bump the limit on search if going against a v2 registry if we're limited in v1 registries?

Comment 2 Qi Wang 2020-08-05 18:46:47 UTC
https://github.com/containers/image/commit/4c0f8a70e6a8401b606e2aa407f3502de2f02521 supports the pagination in containers/image. I didn't see this be imported to podman to enable getting rid of the 100 limit.

Comment 10 Jindrich Novy 2020-08-26 06:55:24 UTC
Tom, I'm still unsure the backport is present in podman-2.0.5. Once clear I can apply for exception to include this bug in the advisory.

Qi, is the backport present in podman-2.0.5?

Comment 19 errata-xmlrpc 2020-11-04 03:06:49 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 (Moderate: container-tools:rhel8 security, bug fix, and enhancement update), 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/RHSA-2020:4694


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