Bug 1028893

Summary: oo-admin-check-resource.py does not fix priority conflict with "fix-all" option
Product: OpenShift Container Platform Reporter: Ma xiaoqiang <xiama>
Component: NodeAssignee: John W. Lamb <jolamb>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: bleanhar, 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: 2013-12-16 09:11:03 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-11 07:18:36 UTC
Description of problem:
oo-admin-check-resource.py does not fix priority conflict with "fix-all" option

Version-Release number of selected component (if applicable):
openshift-openshift-extras-4f0ef12

How reproducible:
always

Steps to Reproduce:
1.register with rhn
#rhnreg_ks --username=$user --password=$passwd --serverUrl=https://xmlrpc.rhn.redhat.com/XMLRPC
2.register several channels as follow.
#rhn-channel -u $user -p $passwd  -r -c rhel-x86_64-server-6-ose-1.2-infrastructure
#rhn-channel -u $user -p $passwd  -r -c rhel-x86_64-server-6-beta
3.run check resources tool
# ./oo-admin-check-sources.py --role=broker  -c beta2.ini  -o 2.0 --fix-all 
4.configure the file as folow
#cat /etc/yum/pluginconf.d/rhnplugin.conf
[main]
enabled = 1
gpgcheck = 1
[rhel-x86_64-server-6]
priority = 20
[rhel-x86_64-server-6-beta]
priority = 99
5.run check resources tool again 
# ./oo-admin-check-sources.py --role=broker  -c beta2.ini  -o 2.0 --fix-all 

Actual results:

Output
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.
The required OpenShift Enterprise repositories are missing:
    rhel-x86_64-server-6-rhscl-1
    rhel-x86_64-server-6-ose-2-infrastructure-beta
Please verify that an OpenShift Enterprise 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
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
The calculated priorities for the following repoids are too large (>= 99)
    rhel-x86_64-server-6-beta
<--snip-->

It does not set priority of the rhel channel, it does not fix the priority problem. I check the resource again 
# ./oo-admin-check-sources.py --role=broker  -c beta2.ini  -o 2.0 --report-all
Output:
Checking channel/repository priorities
The calculated priorities for the following repoids are too large (>= 99)
    rhel-x86_64-server-6-beta
It still prompt that the priority for rhel-x86_64-server-6-beta is too large, seem like --fix-all does nothing.

Expected results:
Should set the priority of the rhel-x86_64-server-6-beta channel.

Additional info:

Comment 3 Ma xiaoqiang 2013-11-18 02:58:42 UTC
check on openshift-openshift-extras-ed3e560

Only get the finally Output
# ./oo-admin-yum-validator --role=broker  -c beta2.ini  -o 2.0 -p
Output:
Please note: --role=broker implicitly enables --role=client to ensure /usr/bin/rhc is available for testing and troubleshooting.
Detected OpenShift Enterprise repository subscription managed by RHN Classic or RHN Satellite.

The required OpenShift Enterprise repositories are missing:
    rhel-x86_64-server-6-rhscl-1
    rhel-x86_64-server-6-ose-2-rhc-beta
    rhel-x86_64-server-6-ose-2-infrastructure-beta
Please verify that an OpenShift Enterprise 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
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
Please re-run this tool after making any recommended repairs to this system

the tool have set the priority correctly.