Project

General

Profile

Bug #29742

podman search against katello

Added by Justin Sherrill 6 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1731229

Description of problem:
Tried to do "podman search" on the registry as provided by Satellite.
but getting error " ERRO0000 error getting search results from v2 endpoint "satellite.example.com:5000", status code 404 (Not Found) "

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

How reproducible:

Steps to Reproduce:
1. On Satellite server, kept redhat-ubi-images-ubi7 on container
2. Tried to search it with following command but facing issue. # podman search redhat-ubi-images-ubi7

Actual results: [root@vmexample ~]# podman search redhat-ubi-images-ubi7
ERRO0000 error getting search results from v2 endpoint "syssat65.gsslab.pnq2.redhat.com:5000", status code 404 (Not Found)

Expected results: It should search for image

Additional info:

Associated revisions

Revision 8c5c4833 (diff)
Added by James Jeffers 3 months ago

Fixes #29742 - registries API updates, fixes search for unathenticated clients

History

#1 Updated by James Jeffers 5 months ago

  • Target version set to Katello 4.0.0

#2 Updated by James Jeffers 5 months ago

  • Triaged changed from No to Yes

#3 Updated by Justin Sherrill 5 months ago

  • Subject changed from podman search against Red Hat Satellite 6 fails. to podman search against katello

#4 Updated by James Jeffers 3 months ago

Updated with comments, the 2 issues of concern:

  • podman search with search term when logged in and Lifecycle Environment has 'unauthenticated pull' set to yes
  • podman search without search term when not logged in (regardless of Lifecycle Environment 'unauthenticated pull' setting)

#5 Updated by James Jeffers 3 months ago

Compare this podman sequence using unauthenticated search with a search term:

DEBU[0000] Credentials not found                        
DEBU[0000] Looking for TLS certificates and private keys in /etc/docker/certs.d/centos7-katello-devel-stable.example.com 
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf" 
DEBU[0000] trying to talk to v1 search endpoint         
DEBU[0000] GET https://centos7-katello-devel-stable.example.com/v2/ 
DEBU[0000] Ping https://centos7-katello-devel-stable.example.com/v2/ status 401 
DEBU[0000] GET https://centos7-katello-devel-stable.example.com/v1/search?n=3&q=hello-world 
DEBU[0000] Called search.PersistentPostRunE(podman search --log-level=debug --tls-verify=false --limit=3 centos7-katello-devel-stable.example.com/hello-world) 

And then this unauthenticated search without a search term:

DEBU[0000] Credentials not found                        
DEBU[0000] Looking for TLS certificates and private keys in /etc/docker/certs.d/centos7-katello-devel-stable.example.com 
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf" 
DEBU[0000] trying to talk to v2 search endpoint         
DEBU[0000] GET https://centos7-katello-devel-stable.example.com/v2/ 
DEBU[0000] Ping https://centos7-katello-devel-stable.example.com/v2/ status 401 
DEBU[0000] GET https://centos7-katello-devel-stable.example.com/v2/token?service=centos7-katello-devel-stable.example.com 
DEBU[0000] error getting search results from v2 endpoint "centos7-katello-devel-stable.example.com": unable to retrieve auth token: invalid username/password: unauthorized: authentication required 
ERRO[0000] error searching registry "centos7-katello-devel-stable.example.com": couldn't search registry "centos7-katello-devel-stable.example.com": unable to retrieve auth token: invalid username/password: unauthorized: authentication required 
DEBU[0000] Called search.PersistentPostRunE(podman search --log-level=debug --tls-verify=false --limit=3 centos7-katello-devel-stable.example.com/) 

In the first case, the following GET after the 401 response is to /v1/search?n=3&q=hello-world

In the second case, the following GET after the 401 response is to /v2/token?service=centos7-katello-devel-stable.example.com

#6 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8840 added

#7 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases Katello 3.18.0 added

#8 Updated by James Jeffers 3 months ago

  • Status changed from Ready For Testing to Closed

#9 Updated by Chris Roberts 3 months ago

  • Target version changed from Katello 4.0.0 to Katello 3.17.0

#10 Updated by Justin Sherrill 3 months ago

  • Target version changed from Katello 3.17.0 to Katello 3.16.0

Also available in: Atom PDF