Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1556740

Summary: Fail to upgrade containerized ocp deployed on rhel when specify openshift_image_tag which is not latest and both old and latest repo enabled
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: Cluster Version OperatorAssignee: Scott Dodson <sdodson>
Status: CLOSED DUPLICATE QA Contact: liujia <jiajliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, jokerman, mmccomas, rteague
Target Milestone: ---   
Target Release: 3.9.z   
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-05-30 12:52:38 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-15 07:38:49 UTC
Description of problem:
Upgrade against containerized ocp deployed on rhel hosts with openshift_image_tag specified in inventory file and both specified repo and latest 3.9 repo enabled on the hosts. The specified openshift_image_tag is not the latest version. 
Upgrade failed at task [openshift_version : Fail if rpm version and docker image version are different].
...
TASK [openshift_version : Get available atomic-openshift version] **************
task path: /usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/check_available_rpms.yml:2
ok: [x.x.x.x] => {"changed": false, "check_mode": false, "results": {"cmd": "/usr/bin/repoquery --plugins --quiet --pkgnarrow=repos --queryformat=%{version}|%{release}|%{arch}|%{repo}|%{version}-%{release} --config=/tmp/tmpUHZ1yu atomic-openshift-3.9*", "package_found": true, "package_name": "atomic-openshift-3.9*", "returncode": 0, "versions": {"available_versions": ["3.9.9"], "available_versions_full": ["3.9.9-1.git.0.b17f716.el7"], "latest": "3.9.9", "latest_full": "3.9.9-1.git.0.b17f716.el7"}}, "state": "list"}
...
TASK [openshift_version : Fail if rpm version and docker image version are different] ***
task path: /usr/share/ansible/openshift-ansible/roles/openshift_version/tasks/masters_and_nodes.yml:7
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "OCP rpm version 3.9.9 is different from OCP image version 3.9.4"}


Version-Release number of the following components:
ansible-2.4.3.0-1.el7ae.noarch
openshift-ansible-3.9.9-1.git.0.1a1f7d8.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Container install ocp v3.7 on rhel hosts.
2. Enable both 3.9.4 and 3.9.9(latest) repos except 3.8 repo.
3. Add openshift_image_tag=v3.9.4 in the inventory file.
4. Run upgrade

Actual results:
Upgrade failed.

Expected results:
Upgrade succeed.

Additional info:
When there are both old repo(3.9.4) and new repo(3.9.9), the specified version's pkg should be installed instead of latest version.

Comment 1 Russell Teague 2018-05-30 12:52:38 UTC

*** This bug has been marked as a duplicate of bug 1579513 ***