Bug 1023361 - oo-admin-check-source broken when all rhn channel is disabled
Summary: oo-admin-check-source broken when all rhn channel is disabled
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: John W. Lamb
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-25 09:24 UTC by Ma xiaoqiang
Modified: 2017-03-08 17:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-16 09:11:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ma xiaoqiang 2013-10-25 09:24:33 UTC
Description of problem:
oo-admin-check-source broken when all rhn channel is disabled
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 rhel-x86_64-server-6-ose-1.2-infrastructure -u user -p passwd 
2.disable the broker channel 
#vim /etc/yum/pluginconf.d/rhnplugin.conf
...
[rhel-x86_64-server-6-ose-1.2-infrastructure]
enabled=0
priority = 10
[rhel-x86_64-server-6]
priority = 90
enabled=0
3.check the resources
#./oo-admin-check-sources.py -r node -o 1.2  

Actual results:
Output
# rhn-channel -a -c rhel-x86_64-server-6-ose-1.2-node
Checking channel/repository priorities
oo-admin-check-sources.py:296: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  self.logger.error('Repository %s not enabled'%ke.message)
Repository rhel-x86_64-server-6 not enabled
Traceback (most recent call last):
  File "oo-admin-check-sources.py", line 399, in <module>
    oacs.main()
  File "oo-admin-check-sources.py", line 373, in main
    self.find_package_conflicts()
  File "oo-admin-check-sources.py", line 297, in find_package_conflicts
    ose_pkg_names = sorted(set([xx.name for xx in ose_pkgs]))
UnboundLocalError: local variable 'ose_pkgs' referenced before assignment

Expected results:
The program should exit normally 

Additional info:

Comment 3 Ma xiaoqiang 2013-10-28 01:35:46 UTC
1.check with rhn
#vim /etc/yum/pluginconf.d/rhnplugin.conf          
[rhel-x86_64-server-6-ose-1.2-infrastructure]
enabled=0
priority = 40

[rhel-x86_64-server-6]
priority = 20
enabled=0
# python oo-admin-check-sources.py -r broker -o 1.2 
Checking if yum-plugin-priorities is installed
The required OpenShift Enterprise repositories are disabled:
    rhel-x86_64-server-6
    rhel-x86_64-server-6-ose-1.2-infrastructure
2.check with rhsm
1)disable all rhsm channel 
2)## python oo-admin-check-sources.py -r node
This system is receiving updates from Red Hat Subscription Management.
If this system will be providing the JBossEAP cartridge, re-run this command with the --role=node-eap argument
Could not determine product version. Please re-run this script with the --oo_version argument.


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