Bug 1025147

Summary: oo-admin-check-sources.py shows wrong prompt message when finding version conflict.
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:06 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-10-31 06:05:56 UTC
Description of problem:
The repos are registered via RHN and RHSM, the tool choose a installing method.
When it check version conflict, it will deal with all repo conflicts via the method the tool choose.
so it show wrong prompt message. 

  
Version-Release number of selected component (if applicable):
https://github.com/openshift/openshift-extras/tree/enterprise-2.0/admin/check-sources

How reproducible:
always

Steps to Reproduce:
1.use the following settings in /etc/rhsm/rhsm.conf:
    hostname=subscription.rhn.stage.redhat.com
    baseurl=https://cdn.rcm-qa.redhat.com 
2.register a subscription
# subscription-manager  subscribe --pool 8a99f98341c648100141d9bab4fc13b5   
3.register a rhn channel 
#rhnreg_ks --username=user --password=passwd --serverUrl=https://xmlrpc.rhn.errata.stage.redhat.com/XMLRPC
#rhn-channel -a -c rhel-x86_64-server-6-ose-1.2-infrastructure -u user -p passwd
#rhn-channel -a -c rhel-x86_64-server-6-ose-2.0-infrastructure -u user -p passwd
4.check the resource
#./oo-admin-check-sources.py --role=node -r broker

Actual results:

Output:
                     
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.
Detected installed OpenShift Enterprise version 2.0
The following OpenShift Enterprise repositories conflict with the detected or specified product version and should be disabled to prevent package conflicts:
    rhel-x86_64-server-6-ose-1.2-infrastructure
Disable these repositories with the following commands:
# subscription-manager repos --disable=rhel-x86_64-server-6-ose-1.2-infrastructure
Please re-run this tool after making any recommended repairs to this system

The rhel-x86_64-server-6-ose-1.2-infrastructure repo is registered by rhn, but the tool show the subscription-manager command to disable the rhn repo.



Expected results:
Should show the command  to disable the repo via RHN

Additional info:

Comment 2 John W. Lamb 2013-10-31 19:37:04 UTC
Addressed in https://github.com/openshift/openshift-extras/pull/131

Please let me know if this behavior can stand further improvement

Comment 4 Ma xiaoqiang 2013-11-04 06:45:31 UTC
Addressed in https://github.com/openshift/openshift-extras/tree/enterprise-2.0/admin/check-sources

# ./oo-admin-check-sources.py  -r node -p                                                 
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 RHN Classic or RHN Satellite.
Detected installed OpenShift Enterprise version 2.0

The following Red Hat Subscription Manager-managed 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-rhc-6-rpms
    # subscription-manager repos --disable=rhel-server-ose-1.2-jbosseap-6-rpms
    # subscription-manager repos --disable=rhel-server-ose-1.2-node-6-rpms
    # subscription-manager repos --disable=rhel-server-ose-1.2-infra-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-ose-1.2-node] section