action #77035
closedcoordination #87853: [epic][brainstorming]
validate api requests to suse registries
0%
Description
Description:
docker search registry.suse.de/suse/sle-15-sp3/update/cr/images/suse/sle15:15.3
fails with error response from daemon: Unexpected status code 404
The same occurs with docker search registry.opensuse.org/kubic/etcd
.
I found a bug which seems relative.[0]
But i am not sure if it is the same problem.
The ticket is about creating test to cover this case.
Updated by ybonatakis almost 4 years ago
- Status changed from New to In Progress
- Assignee set to ybonatakis
Updated by jlausuch almost 4 years ago
- Status changed from In Progress to Workable
- Priority changed from Normal to Low
Closing, this seems to be an infra issue with registry.suse.de.
Customers will use suse.com or any other.
Need more investigation.
Updated by ybonatakis almost 4 years ago
the problem is both docker and podman.
And in addition to registry.suse.de
and registry.opensuse.org
is also reproducible with registry.suse.com
podman seems to try both API versions v1 and v2 and fails on authentication
DEBU[0000] Credentials not found
DEBU[0000] Looking for TLS certificates and private keys in /etc/docker/certs.d/registry.suse.com
DEBU[0000] Loading registries configuration "/etc/containers/registries.conf"
DEBU[0000] trying to talk to v1 search endpoint
DEBU[0000] GET https://registry.suse.com/v2/
DEBU[0000] Ping https://registry.suse.com/v2/ status 401
DEBU[0000] GET https://registry.suse.com/v1/search?n=25&q=suse%2Fsle15
DEBU[0000] error getting search results from v1 endpoint "registry.suse.com": invalid status code from registry 404 (Not Found)
DEBU[0000] trying to talk to v2 search endpoint
DEBU[0000] GET https://registry.suse.com/auth?service=SUSE+Linux+Docker+Registry
DEBU[0000] Increasing token expiration to: 60 seconds
DEBU[0000] GET https://registry.suse.com/v2/_catalog
ERRO[0000] error getting search results from v2 endpoint "registry.suse.com": unable to retrieve auth token: invalid username/password: errors:
denied: requested access to the resource is denied
unauthorized: authentication required
DEBU[0000] Called search.PersistentPostRunE(podman --log-level=debug search registry.suse.com/suse/sle15)
docker seems to try to hit only v1
DEBU[2021-05-18T19:35:38.263310228+02:00] Calling HEAD /_ping
DEBU[2021-05-18T19:35:38.292711778+02:00] Calling GET /v1.40/images/search?limit=25&term=registry.suse.com%2Fsuse%2Fsle15
DEBU[2021-05-18T19:35:38.293524087+02:00] hostDir: /etc/docker/certs.d/registry.suse.com
DEBU[2021-05-18T19:35:38.293573587+02:00] pinging registry endpoint https://registry.suse.com/v1/
DEBU[2021-05-18T19:35:38.293585524+02:00] attempting v1 ping for registry endpoint https://registry.suse.com/v1/
DEBU[2021-05-18T19:35:38.465683447+02:00] Error unmarshaling the _ping PingResult: invalid character 'p' after top-level value
DEBU[2021-05-18T19:35:38.465781018+02:00] PingResult.Version: ""
DEBU[2021-05-18T19:35:38.465807684+02:00] Registry standalone header: ''
DEBU[2021-05-18T19:35:38.465830037+02:00] PingResult.Standalone: true
DEBU[2021-05-18T19:35:38.465869930+02:00] attempting v1 ping for registry endpoint https://registry.suse.com/v1/
DEBU[2021-05-18T19:35:38.588427837+02:00] Error unmarshaling the _ping PingResult: invalid character 'p' after top-level value
DEBU[2021-05-18T19:35:38.588497294+02:00] PingResult.Version: ""
DEBU[2021-05-18T19:35:38.588516917+02:00] Registry standalone header: ''
DEBU[2021-05-18T19:35:38.588521131+02:00] PingResult.Standalone: true
DEBU[2021-05-18T19:35:38.588527861+02:00] Endpoint https://registry.suse.com/v1/ is eligible for private registry. Enabling decorator.
DEBU[2021-05-18T19:35:38.588539713+02:00] Index server: https://registry.suse.com/v1/
DEBU[2021-05-18T19:35:38.706481517+02:00] FIXME: Got an API for which error does not match any expected type!!!: Unexpected status code 404 error_type="*jsonmessage.JSONError" module=api
ERRO[2021-05-18T19:35:38.706504960+02:00] Handler for GET /v1.40/images/search returned error: Unexpected status code 404
DEBU[2021-05-18T19:35:38.706518353+02:00] FIXME: Got an API for which error does not match any expected type!!!: Unexpected status code 404 error_type="*jsonmessage.JSONError" module=api
first thought was to close the ticket but then the bug implies an image issue. WDYT?
Updated by mloviska over 1 year ago
Kinda related, but not exactly any API validation https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17233
Updated by ph03nix over 1 year ago
- Status changed from Workable to Resolved
After looking at the poo and the referenced bsc, the provided solution https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/17233 appears to be valid to me. I'm marking this as resolved, feel free to re-open if there are any missing steps.