Bug 1431972

Summary: The version of excluder packages should be matched with node/master packages
Product: OpenShift Container Platform Reporter: liujia <jiajliu>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED CURRENTRELEASE QA Contact: liujia <jiajliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, ghuang, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-22 12:47:14 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 2017-03-14 08:09:16 UTC
Description of problem:
Trigger containerized install against rhel hosts(which have old version excluders installed), installation complete successfully, but latest version docker-excluder is not installed to ensure right version docker installed. 

openshift-138.x.x.x | SUCCESS | rc=0 >>
atomic-openshift-docker-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch
atomic-openshift-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch

openshift-109.x.x.x | SUCCESS | rc=0 >>
atomic-openshift-docker-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch
atomic-openshift-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch


Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.5.32-1.git.0.42cf266.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. install ocp3.4 and yum install corresponding excluders
2. uninstall ocp3.4 and leave excluders installed and enabled
3. prepare new 3.5 repos
4. container install 3.5 on above hosts 

Actual results:
Latest version docker-excluder is not installed to ensure right version docker installed. 

Expected results:
Corresponding version docker-excluder should be installed. 

Additional info:
The same issue will happen too in following scenario:
When there are n and n+1 ose repos on the hosts, trigger an installation with openshift_release=n specified in hosts, then it will install n+1  version excluders while version n node/master packages installed.

So it is better to sepecify openshift_pkg_version when install excluders in openshift-ansible.

Comment 1 Scott Dodson 2017-03-17 20:00:04 UTC
I believe this was fixed in https://github.com/openshift/openshift-ansible/pull/3642

working to verify that.

Comment 2 Scott Dodson 2017-03-17 20:17:35 UTC
verified this with openshift-ansible-3.5.37-1

Comment 4 liujia 2017-03-20 09:33:51 UTC
Version:
atomic-openshift-utils-3.5.37-1.git.0.62660e8.el7.noarch

Steps:
1. Install old version excluders on fresh hosts.
atomic-openshift-docker-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch
atomic-openshift-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch

2. Prepare new 3.5 repos.
#ls /etc/yum.repos.d/
ose34_latest.repo
ose35_latest.repo
redhat.repo
rhel_virt.repo

3. Container install 3.5 on above hosts 
#ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/config.yml

Result:
openshift-151.x.x.x | SUCCESS | rc=0 >>
atomic-openshift-docker-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch
atomic-openshift-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch

Latest version docker-excluder is not installed to ensure right version docker installed.

Comment 5 liujia 2017-03-20 09:34:29 UTC
I checked linked PR-3642 in comment1, it seems not resolve this issue. It is better to sepecify openshift_pkg_version when install excluders in openshift-ansible just like installing master/node packages.

- name: Install Master package
  package:
    name: "{{ openshift.common.service_type }}-master{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}"
    state: present
  when: not openshift.common.is_containerized | bool

Comment 6 Scott Dodson 2017-03-21 00:17:33 UTC
https://github.com/openshift/openshift-ansible/pull/3716 fixes this, now openshift_pkg_version is respected and we attempt to match the release if possible.

I tested 3.4 installs with 3.4 and 3.5 repos enabled. I tested upgrades from 3.4 to 3.5.

We do *not* account for a situation where 3.5 excluders are installed and you wish to install 3.4 version of the product. In those scenarios users should remove the excluders and ensure the correct repos are enabled or disabled prior to running the installer, it's quite a challenge to figure out when to downgrade and to what version to downgrade to.

Comment 7 liujia 2017-03-21 05:24:27 UTC
Version:
atomic-openshift-utils-3.5.39-1.git.0.cb12cdb.el7.noarch

Steps:
1. Install old version excluders on fresh hosts.
atomic-openshift-docker-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch
atomic-openshift-excluder-3.4.1.10-1.git.0.c96aed3.el7.noarch

2. Prepare new 3.5 repos.
#ls /etc/yum.repos.d/
ose34_latest.repo
ose35_latest.repo
redhat.repo
rhel_virt.repo

3. Container install 3.5 on above hosts 
#ansible-playbook -i hosts /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/config.yml

Result:
openshift-109.x.x.x | SUCCESS | rc=0 >>
atomic-openshift-excluder-3.5.0.55-1.git.0.a552679.el7.noarch
atomic-openshift-docker-excluder-3.5.0.55-1.git.0.a552679.el7.noarch

Latest version docker-excluder is installed on the node to ensure right version docker installed.