Bug 1023391 - oo-admin-check-source doesn't need to check resource when no role is detected.
oo-admin-check-source doesn't need to check resource when no role is detected.
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.0.0
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: John W. Lamb
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-25 06:30 EDT by Ma xiaoqiang
Modified: 2017-03-08 12 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-16 04:11:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ma xiaoqiang 2013-10-25 06:30:35 EDT
Description of problem:
Using the tool to guess the roles of server, when no role is detected, it doesn't  need to check resource. 

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
2.run command  to guess roles 
./oo-admin-check-sources.py  
       
Actual results:
Output:
No roles have been specified. Attempting to guess the roles for this system...
No roles could be detected.
Checking if yum-plugin-priorities is installed
Checking channel/repository priorities
Don't need to check resource when no role is detected.

Expected results:
The tool does not need to check resource.

Additional info:
Comment 2 John W. Lamb 2013-10-29 11:01:47 EDT
Addressed in https://github.com/openshift/openshift-extras/pull/118
Comment 3 Ma xiaoqiang 2013-10-29 21:02:49 EDT
check it on a clean server with registered channels

# python oo-admin-check-sources.py 
Output:
No roles have been specified. Attempting to guess the roles for this system...
No roles could be detected.
Detected installed OpenShift Enterprise version 2.0
Checking if yum-plugin-priorities is installed
Please specify at least one role for this system with the --role command
Please re-run this tool after making any recommended repairs to this system
Comment 4 Ma xiaoqiang 2013-10-30 22:37:16 EDT
check it on the new version 

#python oo-admin-check-sources.py
Output:

No roles have been specified. Attempting to guess the roles for this system...
No roles could be detected.
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-server-ose-1.2-node-6-rpms
    rhel-x86_64-server-6-ose-1.2-infrastructure
    rhel-server-ose-1.2-rhc-6-rpms
    rhel-server-ose-1.2-infra-6-rpms


No role is detected, the tool still check the resource.
Comment 5 Brenton Leanhardt 2013-10-31 11:46:21 EDT
Thanks for being so thorough. :)  In general the goal for oo-admin-check-sources.py can be summarized as follows:

1) Always provide helpful output
2) Fail as soon as the tool doesn't have enough information to proceed
3) If the user corrects a problem, detect that and then show them the next problem.
4) Once everything is correct let the user know

In this scenario it's being detected that OSE 2.0 is installed.  We actually don't want the user to have the 1.2 content sets enabled so if the tool can detect that at this point in the workflow we should advise the user to correct the situation.

If it's not correctly detecting the installed version correctly then that would be a bug.  If this makes sense to you then we could mark if VERIFIED.
Comment 6 John W. Lamb 2013-10-31 11:53:01 EDT
I would like to add that if the version is incorrectly guessed, listing the (wrong) conflicting repos gives the user a chance to say "hey, that's the opposite of what I want", at which point they will hopefully review the options and specify the appropriate version AND the role(s).

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