Bug 1599295 - RHUI docker registry doesn't get added
Summary: RHUI docker registry doesn't get added
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 3.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 3.0.5
: 3.0.x
Assignee: Milan Kubík
QA Contact: Radek Bíba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-09 12:38 UTC by Radek Bíba
Modified: 2018-09-05 17:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-05 17:04:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2649 0 None None None 2018-09-05 17:04:51 UTC

Description Radek Bíba 2018-07-09 12:38:17 UTC
Description of problem:
Some time ago the /etc/sysconfig/docker file stopped containing the following lines:

# If you want to add your own registry to be used for docker search and docker
# pull use the ADD_REGISTRY option to list a set of registries, each prepended
# with --add-registry flag. The first registry added will be the first registry
# searched.
ADD_REGISTRY='--add-registry registry.access.redhat.com'

Instead, the following lines are there now:

# Do not add registries in this file anymore. Use /etc/containers/registries.conf
# from the atomic-registries package.

The docker client configuration RPM needs to adapt to this change. At present, its post-installation script runs the following command:

sed -i '/ADD_REGISTRY/s/=.*/='"'"'--add-registry cds.example.com:5000'"'"'/' /etc/sysconfig/docker

But this command has no effect with recent versions of docker as there's no pattern for sed to modify.

By default, /etc/containers/registries.conf reads:

[registries.search]
registries = ['registry.access.redhat.com']

So, if this exists, it must be changed.

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

How reproducible:
Always

Steps to Reproduce:
1. Add a docker registry to RHUI and sync it.
2. Create a docker configuration RPM and install it on a client.
3. Run docker pull <the ID of the added registry> on the client.


Actual results:
Output:
Trying to pull repository registry.access.redhat.com/<the ID> ...
unknown: Not Found

Expected results:
The "docker pull" command talks with your load balancer on port 5000, not with Red Hat's registry.

Additional info:
The atomic client configuration tarball is also affected. In general:

# grep -r ADD_REGISTRY /etc/
/etc/rhui/templates/ostree-conf.sh:sed -i '/ADD_REGISTRY/s/=.*/='"'"'--add-registry !CDS_HOSTNAME_PORT!'"'"'/' /etc/sysconfig/docker
/etc/rhui/templates/rh-client-config-docker.spec:sed -i '/ADD_REGISTRY/s/=.*/='"'"'--add-registry !CDS!'"'"'/' /etc/sysconfig/docker

Comment 1 Radek Bíba 2018-07-09 12:42:46 UTC
Correction to the steps to reproduce:

1. Add a docker container...
3. Run docker pull <the ID of the added container>

An example of a container which is a good candidate for testing is rhcertification/redhat-certification, whose ID gets set to rhcertification_redhat-certification if you don't specify a custom ID; slashes and dots are converted to underscores by rhui-manager.

Comment 3 Radek Bíba 2018-07-27 05:38:24 UTC
BTW, this also applies to the Atomic client tarball; rhui/tools/etc/rhui/templates/ostree-conf.sh

Comment 7 errata-xmlrpc 2018-09-05 17:04:27 UTC
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-2018:2649


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