Bug 1034623

Summary: oo-admin-yum-validator doesn't use the version/subscription that the user specify
Product: OpenShift Container Platform Reporter: Ma xiaoqiang <xiama>
Component: NodeAssignee: John W. Lamb <jolamb>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: bleanhar, jolamb, libra-onpremise-devel, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-04 14:42:46 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 Ma xiaoqiang 2013-11-26 08:49:45 UTC
Description of problem:
When I specify the "--oo_version" parameter, and not specify the "--subscription-type" parameter, the tool will guess the version, and it will check resource with the guessed version, but not user specified version in command line.

Version-Release number of selected component (if applicable):
https://github.com/dobbymoodge/openshift-extras 

How reproducible:
always

Steps to Reproduce:
1.register to OpenShift High Touch beta subscription with rhsm.
2.enable the node repo
#subscription-manager repos --enable=rhel-6-server-ose-2-beta-node-rpms
3.configure the repo.ini as follow
# vim etc/repos.ini 
<--snip-->
[preferences]
preferred_version = 2.0beta
preferred_subscription = rhn
<--snip-->
4.check the resource
#./oo-admin-yum-validator -r node -p -o 1.2 

Actual results:
Output:
<--snip-->
The following OpenShift Enterprise repositories conflict with the detected or specified product version.
To prevent package conflicts, disable these repositories by running these commands:
    # subscription-manager repos --disable=rhel-server-ose-1.2-node-6-rpms
The following RHN Classic or RHN Satellite-managed OpenShift Enterprise repositories conflict with the detected or specified product version.
To prevent package conflicts, disable these repositories by making the following modifications to /etc/yum/pluginconf.d/rhnplugin.conf
    Set enabled=0 in the [rhel-x86_64-server-6] section
The required OpenShift Enterprise repositories are disabled:
<--snip-->
The tool uses the version it guesses

Expected results:
The tool should use the version that the user specify, the priority of the version/subscription user specify should be higher than the tool guesses.

Additional info:

Comment 2 John W. Lamb 2013-11-27 16:24:59 UTC
Addressed in https://github.com/openshift/openshift-extras/pull/210

Thanks!

Comment 3 John W. Lamb 2013-11-27 19:20:04 UTC
Changes have been merged into master: https://github.com/openshift/openshift-extras/tree/master

Comment 4 Ma xiaoqiang 2013-11-28 01:24:08 UTC
check it on a machine that we have installed broker on it.
it has repos as follow:
rhel-6-server-cf-tools-1-rpms 
rhel-6-server-ose-2-beta-infra-rpms           
rhel-6-server-ose-2-beta-rhc-rpms      
rhel-6-server-rhev-agent-rpms   
rhel-6-server-rpms                              
rhel-server-rhscl-6-rpms
1.configure the repos.ini as follow:
# vim etc/repos.ini 
[preferences]
preferred_version = 2.0beta
preferred_subscription = rhsm
2.check the resource
# ./oo-admin-yum-validator -r node  -o 2.0               
If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.

The following OpenShift Enterprise repositories conflict with the detected or specified product version.
To prevent package conflicts, disable these repositories by running these commands:
    # subscription-manager repos --disable=rhel-6-server-ose-2-beta-infra-rpms
    # subscription-manager repos --disable=rhel-6-server-ose-2-beta-rhc-rpms
Please re-run this tool after making any recommended repairs to this system

the tool uses the version user specify.


check subscription with the same env
./oo-admin-yum-validator -r node  -s rhn -p
If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Detected OpenShift Enterprise version 2.0beta
Please re-run this tool after making any recommended repairs to this system

the tool find the right version, and user have specify the subscription, but the tool exit without checking resource.

Comment 5 John W. Lamb 2013-12-03 21:03:45 UTC
Addressed in https://github.com/openshift/openshift-extras/pull/215

Comment 6 Ma xiaoqiang 2013-12-04 01:57:28 UTC
check on https://github.com/openshift/openshift-extras/

1.register to OpenShift High Touch beta subscription with rhsm.
2.enable the node repo
#subscription-manager repos --enable=rhel-6-server-ose-2-beta-infra-rpms
3.install yum-plugin-priorities.noarch
#yum install yum-plugin-priorities.noarch
4.configure the repos.ini as follow:
# vim etc/repos.ini 
<--snip-->
[preferences]
preferred_version = 2.0beta
preferred_subscription = rhsm
4.check resource as follow command.
# ./oo-admin-yum-validator -r node -r node-eap -s rhn
Detected OpenShift Enterprise version 2.0beta
Please re-run this tool after making any recommended repairs to this system


Now, the tool find the correct version, and the user specify the subscription. but the tool doesn't check resource

Comment 7 John W. Lamb 2013-12-04 16:34:08 UTC
This should (finally) be handled in https://github.com/openshift/openshift-extras/pull/216

Comment 8 Ma xiaoqiang 2013-12-05 00:54:08 UTC
check on https://github.com/openshift/openshift-extras/
1.register to OpenShift High Touch beta subscription with rhsm.
2.enable the node repo
#subscription-manager repos --enable=rhel-6-server-ose-2-beta-node-rpms
3.check resource
# ./oo-admin-yum-validator -r node -s rhn -p
If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Detected OpenShift Enterprise version 2.0beta

The following OpenShift Enterprise repositories conflict with the detected or specified product version.
To prevent package conflicts, disable these repositories by running these commands:
    # subscription-manager repos --disable=rhel-6-server-rpms
    # subscription-manager repos --disable=rhel-server-rhscl-6-rpms
    # subscription-manager repos --disable=rhel-6-server-ose-2-beta-node-rpms
The required OpenShift Enterprise repositories are missing:
    rhel-x86_64-server-6-beta
    rhel-x86_64-server-6-rhscl-1
    rhel-x86_64-server-6
    rhel-x86_64-server-6-ose-2-node-beta
    jb-ews-2-x86_64-server-6-rpm
<--snip-->