Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1599295 - RHUI docker registry doesn't get added
RHUI docker registry doesn't get added
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools (Show other bugs)
3.0.4
Unspecified Unspecified
unspecified Severity unspecified
: 3.0.5
: 3.0.x
Assigned To: Milan Kubík
Radek Bíba
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-09 08:38 EDT by Radek Bíba
Modified: 2018-09-05 13:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-09-05 13:04:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2649 None None None 2018-09-05 13:04 EDT

  None (edit)
Description Radek Bíba 2018-07-09 08:38:17 EDT
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 08:42:46 EDT
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 01:38:24 EDT
BTW, this also applies to the Atomic client tarball; rhui/tools/etc/rhui/templates/ostree-conf.sh
Comment 7 errata-xmlrpc 2018-09-05 13:04:27 EDT
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.