Bug 1384913 - openshift_version is set to wrong value by installer when a broken yum repo config is existing on hosts
Summary: openshift_version is set to wrong value by installer when a broken yum repo c...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.3.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Scott Dodson
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-14 11:07 UTC by Johnny Liu
Modified: 2017-06-09 03:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-09 03:08:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Johnny Liu 2016-10-14 11:07:17 UTC
Description of problem:
openshift_version is set to a wrong value by installer when yum command is printing some extra message except atomic-openshift version, pls see the following steps for more details.

Version-Release number of selected component (if applicable):
openshift-ansible-3.3.35-1.git.0.1be8ddc.el7

How reproducible:
Always

Steps to Reproduce:
1. Launch an instance (e.g: qe-rhel-727_1), make sure there is a broken yum repo config is printing some message to prompt user, e.g:
# yum list atomic-openshift
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Could not contact CDS load balancer rhui2-cds01.us-east-1.aws.ce.redhat.com, trying others.
Available Packages
atomic-openshift.x86_64                                                3.3.1.1-1.git.0.629a1d8.el7                                                 aos

# grep rhui2-cds01.us-east-1.aws.ce.redhat.com /etc/yum.repos.d/*
/etc/yum.repos.d/rhui-load-balancers.conf:rhui2-cds01.us-east-1.aws.ce.redhat.com

# cat /etc/yum.repos.d/rhui-load-balancers.conf
rhui2-cds01.us-east-1.aws.ce.redhat.com
rhui2-cds02.us-east-1.aws.ce.redhat.com

2. Trigger installation
3.

Actual results:
Failed at the following step:
TASK [openshift_common : Install the base package for versioning] **************
Friday 14 October 2016  08:03:42 +0000 (0:00:03.714)       0:05:21.667 ******** 
fatal: [ec2-54-175-76-231.compute-1.amazonaws.com]: FAILED! => {"changed": false, "failed": true, "msg": "No Package matching 'atomic-openshift-Could not contact CDS load balancer rhui2-cds01.us-east-1.aws.ce.redhat.com' found available, installed or updated", "rc": 0, "results": []}

Obviously, the openshift_version is set by installer.

Go through the openshift_version facts in the installation ouptut, found:
TASK [openshift_version : set_fact] ********************************************
Friday 14 October 2016  08:03:11 +0000 (0:00:00.141)       0:04:49.844 ******** 
ok: [ec2-54-175-76-231.compute-1.amazonaws.com] => {"ansible_facts": {"openshift_version": "Could not contact CDS load balancer rhui2-cds01.us-east-1.aws.ce.redhat.com, trying others.\n3.3.1.1"}, "changed": false}

Expected results:
installer should set openshift_version to a correct value.

Additional info:

Comment 2 Steve Kuznetsov 2016-10-27 17:46:24 UTC
Perhaps we should be using `repoquery` look at the version that is installed instead of `yum`:

  $ repoquery --pkgnarrow=installed --queryformat '%{version}' atomic-openshift

Comment 3 Scott Dodson 2017-06-09 03:08:54 UTC
The task in question only happens when there's no version installed. Lowering priority based on the fact that this only happens when we have a broken configuration.


Note You need to log in before you can comment on or make changes to this bug.