Bug 1028892

Summary: oo-admin-check-sources does not properly get priority for rhel when yum-plugin-priorities is not installed
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:24 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:21 UTC
Description of problem:
If yum-plugin-priorities is not installed, the tool still prompt user to adjust the priority after I fixed all the conflicts. 

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  -r broker  -s rhn -o 1.2   --fix-all 
4. run again with "--report-all" option
#  ./oo-admin-check-sources.py  -r broker  -s rhn -o 1.2 --report-all

Actual results:
Output
<--snip-->
# yum install yum-plugin-priorities
Checking channel/repository priorities
Resolving repository/channel/subscription priority conflicts
To resolve conflicting repositories, update /etc/yum/pluginconf.d/rhnplugin.conf with the following changes:
    Set priority=10 in the [rhel-x86_64-server-6-ose-1.2-infrastructure] section
    Set priority=20 in the [rhel-x86_64-server-6] section
<--snip-->

Expected results:
Should not prompt user to adjust the priority.

Additional info:

Comment 2 John W. Lamb 2013-11-15 16:29:41 UTC
I don't think this is a bug, although it is not optimal. Without yum-plugin-priorities, the priority setting doesn't get added to the repository objects' configurations in the Yum API. If the priority attribute isn't set, the tool assumes it's set to 99. --report-all tells the tool to do a *best effort* report of the current state of the system, but when the plugin is missing, since the yum priority attribute can't be read it will always think that the repo priorities need to be adjusted. Note that preceding the problem output is advice that the user install the yum-plugin-priorities package.

I will add an additional notice that gets displayed with yum-plugin-priorities isn't installed but --report-all is set, warning the user that the output may be inaccurate without the priorities plugin.

Comment 3 John W. Lamb 2013-11-15 16:58:18 UTC
Addressed in https://github.com/openshift/openshift-extras/pull/182

Comment 4 Ma xiaoqiang 2013-11-18 02:47:43 UTC
check on openshift-openshift-extras-ed3e560
# ./oo-admin-yum-validator -r node -r broker -a
#./oo-admin-yum-validator -r node -r broker -p
Output:
<--snip>
Checking if yum-plugin-priorities is installed
Required package yum-plugin-priorities is not installed. Install the package with the following command:
# yum install yum-plugin-priorities

PLEASE NOTE: The yum-plugin-priorities package is not installed, so any information reported by this tool regarding repository priorities may not be accurate.
<--snip-->