Bug 1559799

Summary: etcd image wasn't updated to comply with osm_etcd_image during the upgrade
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Michael Gugino <mgugino>
Status: CLOSED ERRATA QA Contact: liujia <jiajliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, vwalek, wmeng
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:10:48 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:

Description liujia 2018-03-23 09:57:33 UTC
Description of problem:
Run upgrade against ocp while specify osm_etcd_image to private registry in inventory file. Etcd image wasn't updated to comply with osm_etcd_image. Still pull image from registry access.

after upgrade:
# docker images |grep etcd
registry.access.redhat.com/rhel7/etcd 

# docker ps |grep etcd
c4f946bed8ff        registry.access.redhat.com/rhel7/etcd                                                                                                               "/usr/bin/etcd"          40 minutes ago      Up 40 minutes                           etcd_container

BTW, rhel7/etcd image was available from specified registry.
# docker pull registry.reg-aws.openshift.com:443/rhel7/etcd 
Using default tag: latest
Trying to pull repository registry.reg-aws.openshift.com:443/rhel7/etcd ... 
latest: Pulling from registry.reg-aws.openshift.com:443/rhel7/etcd
b25889d27310: Pull complete 
9161239f9b22: Pull complete 
67b673e409a5: Pull complete 
Digest: sha256:928956e198ea11820720f1218d954b313e52d5b699be090d1449f8de380b9426
Status: Downloaded newer image for registry.reg-aws.openshift.com:443/rhel7/etcd:latest


Version-Release number of the following components:
openshift-ansible-3.9.14-1.git.0.ca2cfc3.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Install ocp v3.7 with etcd image pulled from registry access by default.
2. Upgrade v3.7 to v3.9 with osm_etcd_image set in inventory file to pull image from private registry
osm_etcd_image=registry.reg-aws.openshift.com:443/rhel7/etcd
3.

Actual results:
Etcd image was still pulled from registry.access.redhat.com.

Expected results:
According to doc[1], etcd image should be pulled from specified reigstry.
[1]https://github.com/openshift/openshift-ansible/blob/release-3.9/inventory/hosts.example

Additional info:

Comment 1 Scott Dodson 2018-03-27 12:25:15 UTC
*** Bug 1560975 has been marked as a duplicate of this bug. ***

Comment 2 Michael Gugino 2018-04-02 14:26:57 UTC
Currently, we don't support changing etcd image during upgrade.  It looks like we parse the existing image name from a config file on the disk, perform some regex/sed against it, and use that to update the existing etcd image with a new version.

Work around for now is to update the image string on ExecStart= line in /etc/systemd/system/{{ etcd_service }}.service

to the registry you want prior to upgrade.

We should implement this feature.

Comment 3 Michael Gugino 2018-05-14 14:38:01 UTC
In Master, this can now be set with etcd_image

Comment 4 liujia 2018-05-23 06:49:39 UTC
Verified on openshift-ansible-3.10.0-0.50.0.git.0.bd68ade.el7.noarch.

after upgrade:
# docker images|grep etcd
registry.access.redhat.com/rhel7/etcd                                       latest              924412659272        2 weeks ago         256 MB
registry.reg-aws.openshift.com:443/rhel7/etcd                               latest              1c65d1efd289        11 months ago       233 MB

Since upgrade failed (track in another issue), for this issue, osm_etcd_image take effect now. Verify this bug.

Comment 6 errata-xmlrpc 2018-07-30 19:10:48 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:1816