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

Bug 1547898

Summary: Minor version upgrade failed when not specify openshift_release
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, vlaad, wmeng
Target Milestone: ---   
Target Release: 3.9.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-03-28 14:29:21 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-02-22 08:52:00 UTC
Description of problem:
Upgrade ocp v3.9 to latest version while not specify openshift_release for a rpm deployed cluster. Upgrade failed at task [Verify OpenShift RPMs are available for upgrade].

TASK [Verify OpenShift RPMs are available for upgrade] *************************
task path: /usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml:42
fatal: [x.x.x.x]: FAILED! => {"msg": "The conditional check '(openshift_pkg_version | default('-0.0', True)).split('-')[1] is version_compare(openshift_release, '<')' failed. The error was: Version comparison: 'openshift_release' is undefined\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml': line 42, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - name: Verify OpenShift RPMs are available for upgrade\n    ^ here\n"}


Version-Release number of the following components:
openshift-ansible-3.9.0-0.47.0.git.0.f8847bb.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Install an old verson v3.9 ocp
2. Run upgrade against above ocp without openshift_release specified in hosts file
3.

Actual results:
Upgrade failed.

Expected results:
Upgrade succeed.

Additional info:
Please attach logs from ansible-playbook with the -vvv flag

Comment 1 Michael Gugino 2018-02-22 16:26:45 UTC
PR Created: https://github.com/openshift/openshift-ansible/pull/7249

Comment 2 Vikas Laad 2018-02-22 21:24:54 UTC
This failure happens when upgrading from 3.7 to 3.8, should I create another bz for it ?

Comment 3 Michael Gugino 2018-02-22 21:40:24 UTC
(In reply to Vikas Laad from comment #2)
> This failure happens when upgrading from 3.7 to 3.8, should I create another
> bz for it ?

If you saw the exact same error message on the exact same task, this patch should resolve it.

You shouldn't upgrade to 3.8, you should upgrade from 3.7 to 3.9 directly using the 3.9 upgrade plays.

Comment 5 liujia 2018-02-27 05:31:30 UTC
verified on openshift-ansible-3.9.0-0.53.0.git.0.f8f01ef.el7.noarch

Comment 8 errata-xmlrpc 2018-03-28 14:29:21 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:0489