Bug 1097844 - oo-admin-yum-validator doesn't detect OSE version 2.1 under RHN
Summary: oo-admin-yum-validator doesn't detect OSE version 2.1 under RHN
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: John W. Lamb
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-14 16:06 UTC by Luke Meyer
Modified: 2014-06-23 07:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The oo-admin-yum-validator tool that shipped with OpenShift Enterprise release 2.1 did not automatically detect the installed product version, which is the default behavior when run without any arguments. Because the oo-diagnostics tool runs the oo-admin-yum-validator tool without any arguments, running the oo-diagnostics tool on release 2.1 reported a warning that it could not detect the product version. This bug fix adds this detection back into the oo-admin-yum-validator tool for release 2.1, and the oo-diagnostics tool no longer reports the warning.
Clone Of:
: 1097920 (view as bug list)
Environment:
Last Closed: 2014-06-23 07:37:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0781 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.1.2 bug fix update 2014-06-23 11:36:38 UTC

Description Luke Meyer 2014-05-14 16:06:41 UTC
Description of problem:

oo-diagnostics calls oo-admin-yum-validator with no args, resulting in a warning because it can't detect the version. This is what I get under an RHN subscription:

[cloud-user@node1 ~]$ sudo oo-admin-yum-validator
No roles have been specified. Attempting to guess the roles for this system...
If the roles listed below are incorrect or incomplete, please re-run this script with the appropriate --role arguments
    node
    node-eap
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.
Could not determine product version. Please re-run this script with the --oo-version argument.
Please re-run this tool after making any recommended repairs to this system


[cloud-user@node1 ~]$ sudo oo-admin-yum-validator -o 2.1
No roles have been specified. Attempting to guess the roles for this system...
If the roles listed below are incorrect or incomplete, please re-run this script with the appropriate --role arguments
    node
    node-eap
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.

Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
No problems could be detected!
[cloud-user@node1 ~]$

Comment 3 John W. Lamb 2014-05-15 14:56:27 UTC
The version of oo-admin-yum-validator we ship for 2.1 currently has the version/product detection hardcoded, and needs the 2.1 detection added. Alternatively, we could pull in the version from here: https://github.com/openshift/openshift-extras/tree/master/admin/yum-validator
and update the repos.ini file appropriately (and do a bunch of testing)

Comment 5 Ma xiaoqiang 2014-06-04 03:25:28 UTC
There are the same issue under RHSM, the function 'guess_ose_version_and_subscription'  doesn't support ose-2.1

Comment 7 John W. Lamb 2014-06-04 19:24:58 UTC
The version of yum-validator on the openshift-extras master branch has been updated to fix this issue for RHSM and RHN: https://github.com/openshift/openshift-extras/tree/master

I think it would be helpful to test this against 2.1 before we package it; pull down the updated version with git:
  git clone https://github.com/openshift/openshift-extras.git
  cd openshift-extras
  git checkout -b master origin/master

Then run the oo-admin-yum-validator tool from inside the repository as usual, but with the -c option to specify the branch configuration file:
  cd admin/yum-validator
  ./oo-admin-yum-validator -c ./etc/repos.ini -r node
etc.

Comment 8 John W. Lamb 2014-06-04 19:48:43 UTC
Please don't mark this as VERIFIED until an updated openshift-enterprise-yum-validator-2.1.x package appears in a puddle (I will update this ticket when that happens)

Sorry for the departure from our normal procedure; the way this tool gets packaged is a little non-standard.

Comment 9 Ma xiaoqiang 2014-06-05 02:33:11 UTC
configure the testing env, then run './oo-admin-yum-validator -r node  -r node-eap '
Output:
Detected OpenShift repository subscription managed by Red Hat Subscription Manager
Detected OpenShift version 2.1

Comment 10 John W. Lamb 2014-06-05 20:10:49 UTC
(In reply to Ma xiaoqiang from comment #9)
> configure the testing env, then run './oo-admin-yum-validator -r node  -r
> node-eap '
> Output:
> Detected OpenShift repository subscription managed by Red Hat Subscription
> Manager
> Detected OpenShift version 2.1

Is that all of the output?

Comment 11 Ma xiaoqiang 2014-06-06 03:15:44 UTC
(In reply to John W. Lamb from comment #10)
> (In reply to Ma xiaoqiang from comment #9)
> > configure the testing env, then run './oo-admin-yum-validator -r node  -r
> > node-eap '
> > Output:
> > Detected OpenShift repository subscription managed by Red Hat Subscription
> > Manager
> > Detected OpenShift version 2.1
> 
> Is that all of the output?

I only paste part of the output
# ./oo-admin-yum-validator -r node
Output:
If this system will be running OpenShift Enterprise and providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Detected OpenShift repository subscription managed by RHN Classic or RHN Satellite
Detected OpenShift version 2.1

The required OpenShift repositories are missing:
    jb-ews-2-x86_64-server-6-rpm
    rhel-x86_64-server-6-rhscl-1
Please verify that an OpenShift subscription is attached to this system using either RHN Classic or Red Hat Subscription Manager by following the instructions here: https://access.redhat.com/site/articles/522923
Please re-run this tool after making any recommended repairs to this system

Comment 13 Ma xiaoqiang 2014-06-13 02:29:02 UTC
Check on puddle [2.1.z/2014-06.12]
Scenario 1: 
Step 1:  Register via rhn and enable the 'rhel-x86_64-server-6-ose-2.1-infrastructure' repo after installing the openshift via yum
Step 2: run the command
## oo-admin-yum-validator -p 
<--snip-->
Detected OpenShift version 2.1
Detected OpenShift repository subscription managed by RHN Classic or RHN Satellite

The required OpenShift repositories are missing:
    rhel-x86_64-server-6-rhscl-1
    rhel-x86_64-server-6-ose-2.1-rhc
<--snip-->

Scenario 2:
Step 1: Register via rhn and enable the 'rhel-6-server-ose-2.1-jbosseap-rpms' repo after installing the openshift via yum
Step 2:
# oo-admin-yum-validator -p 
<--snip-->
Detected OpenShift version 2.1
Detected OpenShift repository subscription managed by Red Hat Subscription Manager

The required OpenShift repositories are disabled:
    rhel-server-rhscl-6-rpms
    rhel-6-server-ose-2.1-rhc-rpms
    rhel-6-server-ose-2.1-infra-rpms
Enable these repositories by running these commands:
<--snip-->

Comment 15 errata-xmlrpc 2014-06-23 07:37:44 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.

http://rhn.redhat.com/errata/RHBA-2014-0781.html


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