Bug 1209639
| Summary: | Bad URI error message when creating Docker container from Docker Hub page | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Og Maciel <omaciel> | ||||||||
| Component: | Container Management | Assignee: | Partha Aji <paji> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Og Maciel <omaciel> | ||||||||
| Severity: | high | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 6.1.0 | CC: | daviddavis, mmccune, paji | ||||||||
| Target Milestone: | Unspecified | ||||||||||
| Target Release: | Unused | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| URL: | http://projects.theforeman.org/issues/10404 | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2015-08-12 14:02:25 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: | |||||||||||
| Attachments: |
|
||||||||||
==> /var/log/messages <==
Apr 7 17:08:05 ibm-x3250m4-03 docker: time="2015-04-07T17:08:05-04:00" level="info" msg="GET /v1.15/images/search?term=fedora"
Apr 7 17:08:05 ibm-x3250m4-03 docker: time="2015-04-07T17:08:05-04:00" level="info" msg="+job search(fedora)"
Apr 7 17:08:05 ibm-x3250m4-03 docker: time="2015-04-07T17:08:05-04:00" level="info" msg="+job resolve_repository(fedora)"
Apr 7 17:08:05 ibm-x3250m4-03 docker: time="2015-04-07T17:08:05-04:00" level="info" msg="+job resolve_repository(docker.io/fedora)"
Apr 7 17:08:05 ibm-x3250m4-03 docker: time="2015-04-07T17:08:05-04:00" level="info" msg="-job resolve_repository(fedora) = OK (0)"
Apr 7 17:08:05 ibm-x3250m4-03 docker: time="2015-04-07T17:08:05-04:00" level="info" msg="-job resolve_repository(docker.io/fedora) = OK (0)"
==> /var/log/foreman/production.log <==
2015-04-07 17:08:05 [I] Processing by ImageSearchController#search_repository as TEXT
2015-04-07 17:08:05 [I] Parameters: {"search"=>"fedora", "registry_id"=>"", "id"=>"2"}
2015-04-07 17:08:05 [I] String does not start with the prefix 'encrypted-', so ForemanDocker::Docker local_docker was not decrypted
==> /var/log/messages <==
Apr 7 17:08:06 ibm-x3250m4-03 docker: time="2015-04-07T17:08:06-04:00" level="info" msg="-job search(docker.io/fedora) = OK (0)"
==> /var/log/foreman/production.log <==
2015-04-07 17:08:06 [I] Rendered /opt/rh/ruby193/root/usr/share/gems/gems/foreman_docker-1.2.0.7/app/views/image_search/_repository_search_results.html.erb (23.5ms)
2015-04-07 17:08:06 [I] Completed 200 OK in 1190ms (Views: 24.2ms | ActiveRecord: 1.9ms)
==> /var/log/messages <==
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="GET /v1.15/images/docker.io:%20docker.io/fedora/json"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="+job image_inspect(docker.io: docker.io/fedora)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: No such image: docker.io: docker.io/fedora
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="-job image_inspect(docker.io: docker.io/fedora) = ERR (1)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="Handler for GET /images/{name:.*}/json returned error: No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="HTTP Error: statusCode=404 No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="GET /v1.15/images/docker.io:%20docker.io/fedora/json"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="+job image_inspect(docker.io: docker.io/fedora)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: No such image: docker.io: docker.io/fedora
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="-job image_inspect(docker.io: docker.io/fedora) = ERR (1)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="Handler for GET /images/{name:.*}/json returned error: No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="HTTP Error: statusCode=404 No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="GET /v1.15/images/docker.io:%20docker.io/fedora/json"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="+job image_inspect(docker.io: docker.io/fedora)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: No such image: docker.io: docker.io/fedora
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="-job image_inspect(docker.io: docker.io/fedora) = ERR (1)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="Handler for GET /images/{name:.*}/json returned error: No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="HTTP Error: statusCode=404 No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="GET /v1.15/images/docker.io:%20docker.io/fedora/json"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="+job image_inspect(docker.io: docker.io/fedora)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: No such image: docker.io: docker.io/fedora
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="info" msg="-job image_inspect(docker.io: docker.io/fedora) = ERR (1)"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="Handler for GET /images/{name:.*}/json returned error: No such image: docker.io: docker.io/fedora"
Apr 7 17:08:09 ibm-x3250m4-03 docker: time="2015-04-07T17:08:09-04:00" level="error" msg="HTTP Error: statusCode=404 No such image: docker.io: docker.io/fedora"
==> /var/log/foreman/production.log <==
2015-04-07 17:08:09 [I] Processing by ImageSearchController#auto_complete_image_tag as JSON
2015-04-07 17:08:09 [I] Parameters: {"search"=>"docker.io: docker.io/fedora", "registry_id"=>"", "id"=>"2"}
2015-04-07 17:08:09 [I] String does not start with the prefix 'encrypted-', so ForemanDocker::Docker local_docker was not decrypted
2015-04-07 17:08:09 [W] Operation FAILED: bad URI(is not URI?): https://index.docker.io/v1/repositories/docker.io: docker.io/fedora/tags
2015-04-07 17:08:09 [I] Rendered common/500.html.erb (3.6ms)
2015-04-07 17:08:09 [I] Completed 500 Internal Server Error in 145ms (Views: 4.1ms | ActiveRecord: 2.3ms)
Created attachment 1011935 [details]
foreman-debug
It looks like something regressed from last build, but I can't tell whether this is caused by a package change or API changes to Docker Hub. Interesting that the same is not happening on a similar system with the same build, but running on RHEL 6.6. The error reported here happened on a RHEL 7.1 system. Created attachment 1012402 [details]
Searching returns strange names
15:51:49 omaciel|QE: daviddavis: so, let me explain something else
15:52:11 omaciel|QE: daviddavis: I typed 'fedora'
15:52:18 omaciel|QE: and clicked the search button
15:52:33 omaciel|QE: the results returned have 'docker.io: docker.io/fedora
15:52:42 omaciel|QE: which I then select
15:52:59 omaciel|QE: the issue here is the names being displayed as valid options for me to select
For Beta we need to recommend using docker-1.4.1-37.el7.x86_64.rpm or docker-1.3.2-4.el7.x86_64.rpm For GA we will probably try to get it to work with both versions or work with the latest. Created redmine issue http://projects.theforeman.org/issues/10404 from this bug Bug is easier stated this way on centos 7 -> $ docker version Client version: 1.5.0-dev Client API version: 1.18 Go version (client): go1.3.3 $ docker search centos NAME DESCRIPTION STARS OFFICIAL AUTOMATED docker.io: docker.io/centos The official build of CentOS. 978 [OK] docker.io: docker.io/ansible/centos7-ansible Ansible on Centos7 40 [OK] ..... On fedora 20 -> $ docker version Client version: 1.5.0 Client API version: 1.17 $ docker search centos NAME DESCRIPTION STARS OFFICIAL AUTOMATED centos The official build of CentOS. 978 [OK] ansible/centos7-ansible Ansible on Centos7 40 [OK] ...... Note the "docker.io: " prefix for the centos 7 name columns http://rhelblog.redhat.com/2015/04/15/understanding-the-changes-to-docker-search-and-docker-pull-in-red-hat-enterprise-linux-7-1/ has details on why thats the case. When you ask foreman-docker "search centos from docker hub", it gives you different names based on whether the docker compute resource is running on el7 or fedora 20. You then select an image and it shows the tags for that. Based on your selections it picks "NAME" as the repo name and chooses the tag. This works for docker compute instance running on f20 and used to work for docker instance on el7. Anyway problem is simple -> "docker.io: docker.io/centos" is not a valid repo name. So foreman-docker has to somehow infer that "docker.io/centos" is what the repo name should be and strip out "docker.io: " while it should some how also work for "my-other-registry.com:4000/cool-repo" and not strip out "my-other-registry.com:4000". https://github.com/theforeman/foreman-docker/pull/113 - should be fixed when this PR gets merged Moving to POST since upstream bug http://projects.theforeman.org/issues/10404 has been closed ------------- Partha Aji Applied in changeset commit:foreman-docker|c36fdec1d3d287773284f8ef305782321a111e25. Tested and verified that this works on current Satellite 6.1 GA SNAP 5 Compose 2 build under the following environments:
* RHEL 7.1
* python-pulp-docker-common-0.2.5-1.el7sat.noarch
* ruby193-rubygem-docker-api-1.17.0-1.1.el7sat.noarch
* docker-selinux-1.6.0-11.el7.x86_64
* ruby193-rubygem-foreman_docker-1.2.0.14-1.el7sat.noarch
* pulp-docker-plugins-0.2.5-1.el7sat.noarch
* docker-1.6.0-11.el7.x86_64
* rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el7sat.noarch
* RHEL 6.6
* ruby193-rubygem-docker-api-1.17.0-1.1.el6_6sat.noarch
* python-pulp-docker-common-0.2.5-1.el6_6sat.noarch
* pulp-docker-plugins-0.2.5-1.el6_6sat.noarch
* ruby193-rubygem-foreman_docker-1.2.0.14-1.el6_6sat.noarch
* rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el6_6sat.noarch
* docker-io-1.5.0-1.el6.x86_64
This bug is slated to be released with Satellite 6.1. This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015. |
Created attachment 1011934 [details] Error when creating new container Description of problem: Trying to create a new Docker container using the Docker Hub form is now failing with a bad URI error (see attached screenshot). Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create a new Docker container 2. Select the proper compute resource 3. Select the Docker Hub form 4. Type 'wordpress' and then click the 'search' button (ie. magnifying glass button) Actual results: The screenshot shows an error message. Also, the message says to use the "Foreman ticketing system" instead of Red Hat Bugzilla. Expected results: Additional info: