Bug 1230710
Summary: | Can't create container from external registry | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Elyézer Rezende <erezende> |
Component: | Container Management | Assignee: | Daniel Lobato Garcia <dlobatog> |
Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.1.0 | CC: | abradshaw, dherrman, ehelms, lpramuk, mmccune, oshtaier |
Target Milestone: | Unspecified | Keywords: | Regression, Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/14181 | ||
Whiteboard: | |||
Fixed In Version: | rubygem-foreman_docker-2.0.1.4-1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-07-27 09:15:57 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
Elyézer Rezende
2015-06-11 12:37:31 UTC
The error here was that the registry was specified as: registry.access.redhat.com vs: http://registry.access.redhat.com the protocol is required. We should validate the field input to verify that it is a URL I also came across this issue, so I added the http://registry.access.redhat.com but this also failed, then I added https://registry.access.redhat.com This seemed to work much better (from looking at the logs) but then I ran into a different issue Maybe we should add a verification step on the field, the one that requires a protocol Tested it today using Satellite 6.1.4 and different docker client versions. It works using https with docker 1.7.1 and in contrast to katello repos also using current docker version (1.8.2). Using http fails with both versions. Tested both WebUI and hammer CLI. A registry may be available only under https. I think registry.access.redhat.com is the case, this can explain why it is failing for http. Fixed under - https://github.com/theforeman/foreman-docker/pull/142 to be merged Fix merged upstream FailedQA. @Sat6.2.0-Beta-Snap5 This is a showstopper, cannot create external registry anymore While in Snap4 I was able to create and even search external registries such as https://registry.hub.docker.com or https://registry.access.redhat.com 2016-03-24 05:18:50 [app] [I] Failed to save: Unable to log in to this Docker Registry - Expected([200, 201, 202, 203, 204, 304]) <=> Actual(404 Not Found) Similar message is also shown at UI. (What about 301 and 302? these should also be expected...) Lukas, 301 shouldn't really be expected. Satellite 6 only supports Docker Registry API v1 for external registries (https://registry.hub.docker.com/ changed to v2 very recently). If you want to add registries, ensure they're v1 first. The patch I'm working on uses basic authentication with v1 registries to $REGISTRYURL/v1/users. The current call to '/auth' is wrong as it authenticates to the docker host, not the registry. Thanks for spotting that. Now under review at https://github.com/theforeman/foreman-docker/pull/148 FailedQA. @Sat6.2.0-Beta-Snap6.2 tfm-rubygem-foreman_docker-2.0.1.3-1.el7sat.noarch 2016-04-06 14:25:35 [app] [I] Started POST "/registries" for <CLIENT_IP> at 2016-04-06 14:25:35 -0400 2016-04-06 14:25:35 [app] [I] Processing by RegistriesController#create as HTML 2016-04-06 14:25:35 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"RLUwHJsw1ACjnBKnNMtHvjbPxc88aApYjhoxI4uhN54=", "docker_registry"=>{"name"=>"hub.docker.com", "url"=>"https://registry.hub.docker.com/", "description"=>"", "username"=>"", "password"=>"[FILTERED]", "location_ids"=>[""], "organization_ids"=>["", "1"]}, "commit"=>"Submit"} 2016-04-06 14:25:35 [app] [I] Failed to save: Unable to log in to this Docker Registry - Expected([200, 201, 202, 203, 204, 304]) <=> Actual(503 Service Unavailable) https://registry.hub.docker.com/ >>> Actual(503 Service Unavailable) https://registry.access.redhat.com/ >>> Actual(404 Not Found) I'm sorry but how have you even tested this? The second cherry-pick that fixed that wasn't even made yet. ----------------------- Notice: https://github.com/theforeman/foreman-docker/pull/148 is not in here: https://gitlab.sat.lab.tlv.redhat.com/satellite6/foreman_docker/blob/SATELLITE-6.2.0/app/models/docker_registry.rb ----------------------- I don't know why this was set to on_qa w/o the second cherry-pick, but it should be definitely on POST. VERIFIED. @Sat6.2.0-Beta-Snap8 tfm-rubygem-foreman_docker-2.0.1.4-1.el7sat.noarch I was able to create an external registry. (Step 1) I was able to search for rhel images using external registry (Step 3) only if username(password) didnt contain special char >>> I guess username/password is not urlencoded - lets have another bz for this (not regression) I was able to create a container based on rhel image using external registry (Step 4) <<< SUCCESS >>> Though I wasn't able to power it on (another bz) 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, 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/RHBA-2016:1501 |