Bug 1749341 - During upgrade playbook is not respecting `openshift_docker_additional_registries` varisble
Summary: During upgrade playbook is not respecting `openshift_docker_additional_regist...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.11.z
Assignee: Russell Teague
QA Contact: Gaoyun Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-05 12:00 UTC by Abhishek
Modified: 2019-09-24 08:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Update registries.conf during upgrades Update the registries.conf file during upgrades if inventory vars are set and have been changed since install or last upgrade.
Clone Of:
Environment:
Last Closed: 2019-09-24 08:08:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift openshift-ansible pull 11888 0 None closed Bug 1749341: Update registries.conf during upgrades 2020-05-07 20:18:03 UTC
Red Hat Product Errata RHBA-2019:2816 0 None None None 2019-09-24 08:08:17 UTC

Description Abhishek 2019-09-05 12:00:49 UTC
Description of problem:
During upgrade when we add below parameter in the inventory it is not applying in the registries.conf or in docker configuration.

openshift_docker_additional_registries='docker-registry.default.svc:5000,registry.example.com'

Comment 1 Russell Teague 2019-09-06 15:13:11 UTC
The registries.conf file is only updated during the initial install when running prerequisites.yml.  However, during upgrade, the registry_auth is updated, which could lead to an issue pulling images if the registries.conf is not also updated.  We will update the upgrade playbooks to refresh the contents of registries.conf at the same time auth is updated right before docker is restarted.

Comment 4 Gaoyun Pei 2019-09-18 10:17:05 UTC
Verify this bug with openshift-ansible-3.11.146-1.git.0.fcedb45.el7.noarch.rpm

On a running 3.10 cluster, check /etc/containers/registries.conf

[registries.search]
registries = ['registry.access.redhat.com', 'docker.io', 'registry.fedoraproject.org', 'quay.io', 'registry.centos.org']


Upgrade this cluster to 3.11 with the following parameter set:
openshift_docker_additional_registries="docker-registry.default.svc:5000,registry.example.com"


During upgrade, we could see:
TASK [container_runtime : Update registries.conf] ******************************
changed: [ec2-54-81-118-40.compute-1.amazonaws.com] => {"backup_file": "/etc/containers/registries.conf.2802.2019-09-18@05:45:07~", "changed": true, "checksum": "61cd1fbade93992d737ff5b9309f87e6a3999972", "dest": "/etc/containers/registries.conf", "gid": 0, "group": "root", "md5sum": "0c0cf358b68f7646dec823545982f8f7", "mode": "0644", "owner": "root", "secontext": "system_u:object_r:etc_t:s0", "size": 1159, "src": "/root/.ansible/tmp/ansible-tmp-1568799906.71-179488685123166/source", "state": "file", "uid": 0}

check /etc/containers/registries.conf again, it's updated.

[registries.search]
registries = ["docker-registry.default.svc:5000", "registry.example.com", "docker.io"]

Comment 6 errata-xmlrpc 2019-09-24 08:08:09 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-2019:2816


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