Bug 1028941

Summary: oo-admin-check-resource.py does not find out all the package conflicts
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:13 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 09:49:36 UTC
Description of problem:
When I register by both RHSM and RHN, the tool can not find out the package conflict between rhn channel and rhsm channel.


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

How reproducible:
always

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


Actual results:

Output
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.
Detected installed OpenShift Enterprise version 2.0

Checking if yum-plugin-priorities is installed
Checking channel/repository priorities

The following repositories need package exclusions set:
    rhel-6-server-rpms
    rhel-6-server-beta-rpms
Make the following modifications to /etc/yum.repos.d/redhat.repo
Add the following line to the [rhel-6-server-rpms] section:
    exclude=tomcat6*
Add the following line to the [rhel-6-server-beta-rpms] section:
    exclude=tomcat6*
Please re-run this tool after making any recommended repairs to this syste


It does not find out the package conflict between rhel-x86_64-server-6-ose-2-infrastructure-beta and rhel-6-server-ose-2-beta-infra-rpms


Expected results:
Find out the package conflict between rhn channel and rhsm channel 

Additional info:

Comment 2 John W. Lamb 2013-11-12 16:35:36 UTC
Resolved in https://github.com/openshift/openshift-extras/pull/174

Comment 3 Ma xiaoqiang 2013-11-13 02:03:21 UTC
check it on openshift-openshift-extras-64a0443
1.register to OpenShift High Touch beta subscription with rhsm
2.run check resources tool to fix all problem with rhsm channel 
# ./oo-admin-check-sources.py --role=broker  -c beta2.ini  -o 2.0 -a
3.register with rhn
#rhnreg_ks --username=$user --password=$passwd --serverUrl=https://xmlrpc.rhn.redhat.com/XMLRPC
4.register several channels as follow.
#rhn-channel -u $user -p $passwd  -a -c rhel-x86_64-server-6-ose-2-infrastructure-beta
5.configure the priority for rhn channel as follow
#cat /etc/yum/pluginconf.d/rhnplugin.conf
[main]
enabled = 1
gpgcheck = 1
[rhel-x86_64-server-6-ose-2-infrastructure-beta]
priority = 5
[rhel-x86_64-server-6]
priority = 10
6../oo-admin-check-sources.py -r broker -c beta2.ini -p

Output:
Detected OpenShift Enterprise repository subscription managed by Red Hat Subscription Manager.
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
No problems could be detected!


There should be some package conflict between rhel-x86_64-server-6-ose-2-infrastructure-beta and rhel-6-server-ose-2-beta-infra-rpms,  the tool does not found out it. Normally, this problem does not lead to failure installation. But there also should be some package conflict between rhel-6-server-rpms and rhel-x86_64-server-6, and the tool need to set package exclusions for rhel repo, the tool only set package exclusions for rhel repos registered by rhsm. However the priority of rhel repo registered by rhn is higher than by rhsm, so setting  package exclusions does not take effect.

Comment 4 John W. Lamb 2013-11-13 17:10:11 UTC
Addressed in https://github.com/openshift/openshift-extras/pull/176

Comment 5 Ma xiaoqiang 2013-11-14 01:42:34 UTC
check it on openshift-openshift-extras-bb12040
# ./oo-admin-check-sources.py -r broker -c beta2.ini -s rhsm -p -o 2.0

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-rhscl-1] section
    Set enabled=0 in the [rhel-x86_64-server-6-beta] section
    Set enabled=0 in the [rhel-x86_64-server-6-ose-2-infrastructure-beta] section
    Set enabled=0 in the [rhel-x86_64-server-6] section
The required OpenShift Enterprise repositories are missing:
<--snip-->