Bug 1225195 - Can not pull docker images from Satellite 6 once they are synced
Summary: Can not pull docker images from Satellite 6 once they are synced
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Elyézer Rezende
URL: http://projects.theforeman.org/issues...
Depends On:
TreeView+ depends on / blocked
Reported: 2015-05-26 19:21 UTC by Bryan Kearney
Modified: 2017-02-23 19:59 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-08-12 13:56:33 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 10620 0 Normal Closed Can not pull docker images from katello once they are synced 2020-03-05 15:29:25 UTC

Description Bryan Kearney 2015-05-26 19:21:32 UTC
Using the script at https://github.com/bkearney/soe-reference-architecture/blob/bk/container.sh I can not pull any of docker images from the satellite.

Expected result: Be able to docker pull any of the items.

Actual Result: 404 because they are protected.

Comment 1 Partha Aji 2015-05-26 21:04:30 UTC
Created redmine issue http://projects.theforeman.org/issues/10620 from this bug

Comment 2 Partha Aji 2015-05-26 21:30:32 UTC
Should be resolved when this gets merged

Comment 3 Bryan Kearney 2015-05-29 20:06:10 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/10620 has been closed
Partha Aji
Applied in changeset commit:katello|70dda2a57fcf4f285b6952d073f93842331622ed.

Comment 4 Bryan Kearney 2015-05-31 13:08:48 UTC
commit b751e87d55be0ed16030fb00793b4ad699475495
Author: Partha Aji <paji>
Date:   Tue May 26 17:01:39 2015 -0400

    Fixes #10620 - Repos no longer protected by default
    Repositories created via UI are not protected by default, however this
    is not the case for CLI. Repos created by the cli tend to have the
    protection on by default. This does not work well for docker, so trying
    to be consistent here.
    Also updated code to always set protected to false for docker type. This
    is because docker type does not have any protection at this time.
    (cherry picked from commit 70dda2a57fcf4f285b6952d073f93842331622ed)

Comment 5 Elyézer Rezende 2015-06-15 18:07:08 UTC
Verified on: S8C2

Steps to verify:

1) Ran the commands described on bug's description:

hammer organization create --name "Container Org"

hammer lifecycle-environment create --organization "Container Org" --name "DEV" --description "development" --prior "Library"

hammer product create --name='containers' --organization="Container Org"
hammer repository create --name='rhel' --organization="Container Org" --product='containers' --content-type='docker' --url='https://registry.access.redhat.com' --docker-upstream-name='rhel' --publish-via-http="true"
hammer repository create --name='wordpress' --organization="Container Org" --product='containers' --content-type='docker' --url='https://registry.hub.docker.com' --docker-upstream-name='wordpress' --publish-via-http="true"
hammer repository create --name='mysql' --organization="Container Org" --product='containers' --content-type='docker' --url='https://registry.hub.docker.com' --docker-upstream-name='mysql' --publish-via-http="true"

hammer product synchronize --organization "Container Org" --name "containers"

hammer content-view create --name "registry" --description "Sample Registry" --organization "Container Org"
hammer content-view add-repository --organization "Container Org" --name "registry" --repository "rhel" --product "containers"
hammer content-view add-repository --organization "Container Org" --name "registry" --repository "mysql" --product "containers"
hammer content-view add-repository --organization "Container Org" --name "registry" --repository "wordpress" --product "containers"

hammer content-view publish --organization "Container Org" --name "registry" 

2) Searched for a repo id in order to pull images from and grabbed the published at info:

hammer repository list --content-type docker --organization "Container Org" --content-view "registry" --lifecycle-environment "Library"

hammer repository info --id 38

Published At:       sat6server.com:5000/container_org-library-registry-containers-rhel

3) Installed the certificate RPM:

[root@docker-host ~]# rpm -Uvh http://sat6server.com/pub/katello-ca-consumer-latest.noarch.rpm

4) Pulled the image:

[root@docker-host ~]# docker pull sat6server.com:5000/container_org-library-registry-containers-rhel
Trying to pull repository sat6server.com:5000/container_org-library-registry-containers-rhel ...
65de4a13fc7c: Download complete
Status: Downloaded newer image for sat6server.com:5000/container_org-library-registry-containers-rhel:latest

[root@docker-host ~]# docker images
REPOSITORY                                                                                                           TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
sat6server.com:5000/container_org-library-registry-containers-rhel                             latest              65de4a13fc7c        5 weeks ago         154.9 MB

Comment 6 Bryan Kearney 2015-08-11 13:20:30 UTC
This bug is slated to be released with Satellite 6.1.

Comment 7 Bryan Kearney 2015-08-12 13:56:33 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.

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