Bug 1028892 - oo-admin-check-sources does not properly get priority for rhel when yum-plugin-priorities is not installed
Summary: oo-admin-check-sources does not properly get priority for rhel when yum-plugi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: John W. Lamb
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-11 07:18 UTC by Ma xiaoqiang
Modified: 2017-03-08 17:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-16 09:11:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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-->


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