Bug 1022824

Summary: Error message is given out when running oo-admin-check-sources.py to fix a disabled repo
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:04 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:35:48 UTC
Description of problem:
Disable a repo which is used by openshift, then run oo-admin-check-sources.py to fix it, but error message is given out.

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.Make sure this subscription has a disabled repo, if not, run the command
#yum-config-manager --disable jb-ews-2-for-rhel-6-server-rpms --save 
<let us use yum-config-manager tools to disable repo>
4.check the resource
#./oo-admin-check-sources.py --role=node --fix


Actual results:
Output
Enabled repository jb-ews-2-for-rhel-6-server-rpms
Traceback (most recent call last):
  File "./oo-admin-check-sources.py", line 413, in <module>
    oacs.main()
  File "./oo-admin-check-sources.py", line 382, in main
    self.check_disabled_repos()
  File "./oo-admin-check-sources.py", line 260, in check_disabled_repos
    self.calculate_enabled_repos()
AttributeError: OpenShiftAdminCheckSources instance has no attribute 'calculate_enabled_repos'

Expected results:
The tool should enable the repo successfully

Additional info:

Comment 2 John W. Lamb 2013-10-24 19:28:36 UTC
This has been addressed in this pull request:
  https://github.com/openshift/openshift-extras/pull/108
...which has been merged into the enterprise-2.0 branch of openshift-extras.

Comment 3 Ma xiaoqiang 2013-10-25 02:25:04 UTC
check it on the new version
#yum-config-manager --disable jb-ews-2-for-rhel-6-server-rpms --save 
#./oo-admin-check-sources.py --role=node --fix
Output:
If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Detected installed OpenShift Enterprise version 1.2
Checking if yum-plugin-priorities is installed
Enabled repository jb-ews-2-for-rhel-6-server-rpms