Bug 1023361 - oo-admin-check-source broken when all rhn channel is disabled
oo-admin-check-source broken when all rhn channel is disabled
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.0.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: John W. Lamb
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-25 05:24 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:28 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 05:24:33 EDT
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-27 21:35:46 EDT
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.