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:
Fixed in https://github.com/openshift/openshift-extras/pull/113 to https://github.com/openshift/openshift-extras/tree/enterprise-2.0
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.