Bug 1022828

Summary: oo-admin-check-source tool can not guess the system is installed by rhn or rhsm.
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: medium    
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:01 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:
Embargoed:

Description Ma xiaoqiang 2013-10-24 06:43:37 UTC
Description of problem:
When I register some channels, the tools can not guess the system is installed by rhn or rhsm. Then the tools exit.

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.register rhn channel 
#rhnreg_ks --username=user --password=passwd --serverUrl=https://xmlrpc.rhn.errata.stage.redhat.com/XMLRPC
#rhn-channel -a -c jbappplatform-6-x86_64-server-6-rpm -u user -p passwd 
#rhn-channel -a -c jb-ews-2-x86_64-server-6-rpm -u user -p passwd 
2.run command  to check resource 
./oo-admin-check-sources.py -o 1.2 -r node 
         
Actual results:
Output:
NOTE: If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
ERROR: Could not determine subscription type or product version. Register your system to RHSM or RHN and re-run this script with the --oo_version argument
Then the tools exit, does not continue the check process.

Expected results:
The tools shoud guess the system is installed by rhn or rhsm, and continue the check process.

Additional info:
I think we can allow user to assign the intalling method by adding a parameter.

Comment 2 John W. Lamb 2013-10-24 16:01:10 UTC
Fixed in https://github.com/openshift/openshift-extras/pull/107

Tested and merged, updated code available in https://github.com/openshift/openshift-extras/tree/enterprise-2.0

Comment 3 Ma xiaoqiang 2013-10-25 02:26:50 UTC
check it on new version
# rhn-channel -l
rhel-x86_64-server-6
# ./oo-admin-check-sources.py -r node -o 1.2

Output
If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Checking if yum-plugin-priorities is installed
The required OpenShift Enterprise repositories are missing: ['jb-ews-2-x86_64-server-6-rpm', 'rhel-x86_64-server-6-ose-1.2-node']