Bug 1304150

Summary: Can't upgrade atomic-openshift to specified version
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: Cluster Version OperatorAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: aos-bugs, bleanhar, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: atomic-openshift-utils-3.0.39-1.git.0.226c87d.el7aos.noarch Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-29 12:57:43 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:

Description Anping Li 2016-02-03 01:50:10 UTC
Description of problem:
ansible can't upgrade to specify version for example atomic-openshift 3.1.0.4. 
It is a similar with bug https://bugzilla.redhat.com/show_bug.cgi?id=1302276. but it failed at "TASK: [openshift_common | Install the base package for versioning]".


Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.0.35

How reproducible:
always

Steps to Reproduce:
1. register to RHSM channel and enable ose-3.1 repo
2. set openshift_pkg_version=-3.1.0.4 in ansible inventory file
3. ansible-playbook -i  /root/config/ose3104 /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_0_to_v3_1/upgrade.yml

Actual results:
TASK: [openshift_common | Install the base package for versioning] ************ 
<10.14.6.120> ESTABLISH CONNECTION FOR USER: root
<10.14.6.120> REMOTE_MODULE yum name=atomic-openshift-3.1.0.4 state=present
<10.14.6.120> EXEC ssh -C -tt -v -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 10.14.6.120 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1454390262.43-278576906777336 && echo $HOME/.ansible/tmp/ansible-tmp-1454390262.43-278576906777336'
EXEC previous known host file not found for 10.14.6.120
persistent-data.x86_64 0:0.5.5-1.el7 will be an update\n--> Finished Dependency Resolution\n You could try using --skip-broken to work around the problem\n You could try running: rpm -Va --nofiles --nodigest\n"]}
msg: Error: Package: atomic-openshift-3.1.0.4-1.git.15.5e061c3.el7aos.x86_64 (rhel-7-server-ose-3.1-rpms)
           Requires: atomic-openshift-clients = 3.1.0.4-1.git.15.5e061c3.el7aos
           Available: atomic-openshift-clients-3.1.0.4-1.git.4.b6c7cd2.el7aos.x86_64 (rhel-7-server-ose-3.1-rpms)
               atomic-openshift-clients = 3.1.0.4-1.git.4.b6c7cd2.el7aos
           Available: atomic-openshift-clients-3.1.0.4-1.git.10.ec10652.el7aos.x86_64 (rhel-7-server-ose-3.1-rpms)
               atomic-openshift-clients = 3.1.0.4-1.git.10.ec10652.el7aos
           Available: atomic-openshift-clients-3.1.0.4-1.git.15.5e061c3.el7aos.x86_64 (rhel-7-server-ose-3.1-rpms)
               atomic-openshift-clients = 3.1.0.4-1.git.15.5e061c3.el7aos
           Installing: atomic-openshift-clients-3.1.1.6-1.git.0.b57e8bd.el7aos.x86_64 (rhel-7-server-ose-3.1-rpms)
               atomic-openshift-clients = 3.1.1.6-1.git.0.b57e8bd.el7aos
<---snip--->

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/root/upgrade.retry

10.14.6.120                : ok=82   changed=14   unreachable=0    failed=1   
10.14.6.126                : ok=22   changed=4    unreachable=0    failed=0   
localhost                  : ok=14   changed=0    unreachable=0    failed=0   

Expected results:
The ose cna be upgraded to the specified pkg version.

Additional info:

Comment 2 Anping Li 2016-02-04 00:44:39 UTC
The upgrade failed at different task with BZ1302276. atomic-openshift-utils-3.0.38-1 wasn't fix this issue.

Comment 3 Brenton Leanhardt 2016-02-04 14:18:00 UTC
And now I see that you are referring to the upgrade failing... not a fresh install.  This really seems like a RPM is missing from our channel or something like that.  I'll investigate now.

Comment 4 Brenton Leanhardt 2016-02-04 16:13:28 UTC
Ok, I think I see what is happening after reproducing the problem to see the full logs.  This definitely has to do with 3.0->3.1 packaging rename.  You can see this clearly with the following steps:

* install 3.0
* enable the 3.1 channel
* yum install atomic-openshift-3.1.0.4

What yum does is notice that atomic-openshift obsoletes the openshift package.  Since other 3.0 packages are installed that require that package (eg, openshift-master) it then looks for their replacements.  However, it's not smart enough to find a 3.1.0.4 compatible version and instead is looking for the latest version of those dependencies (now 3.1.1.6) which is not compatible.

At the end of the day we just need to get the correct packages installed so we can probably update the playbook to better handle this edge case.

Comment 7 Anping Li 2016-02-14 05:47:36 UTC
Verified and pass with atomic-openshift-utils-3.0.40

Comment 9 errata-xmlrpc 2016-02-29 12:57:43 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-2016:0311