Red Hat Bugzilla – Bug 734492
Package Manager GUI forces re-register of system even if registered correctly
Last modified: 2016-07-03 20:56:42 EDT
Description of problem:
Opening the Package Updater GUI redirects user to the rhn_register GUI screen, even if registered correctly. The register screen then displays a warning that the machine is already registered. Running `yum update` from the command line works fine and is unaffected by this issue.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Upgrade yum-rhn-plugin from 0.5.4-22.el5 to 0.5.4-22.el5_7.1
2. Run Package Updater
RHN Registration process is started with warning that the machine is already registered
Package Updater displays out-of-date packages eligible for upgrade.
To work around this issue, you can downgrade the package to 0.5.4-22.el5 with the following command
# yum downgrade yum-rhn-plugin
However, the package update then prompts the user to upgrade this package again.
Related issue: https://bugzilla.redhat.com/show_bug.cgi?id=734965
Here's what's going on.
Here's the piece of code from pup, which decides whether it needs to run
if not self.registered and len(self.repos.listEnabled()) == 0:
... # here we'll run rhn_register
self.registered is not interesting here.
Ordinarily (i.e. if you're registered), self.repos should be populated
with info about repos provided by RHN by yum-rhn-plugin.
The repo population magic happens in /usr/lib/yum-plugins/rhnplugin.py
The problem here is that the init_hook() that went out in
yum-rhn-plugin-0.5.4-22.el5_7.1 contains the following check before it
actually populates the repositories information:
if ('--help' in cmd_args or '--version' in cmd_args or cmd_args == ):
rhn_enabled = False
1. You run pup (without any command line arguments)
2. init_hook() will bail in the above check, not populating the repos info
3. pup in turn will see we have no repos enabled and will ask you to
register w/ RHN
*** Bug 735246 has been marked as a duplicate of this bug. ***
The issue has been fixed in spacewalk master by
734492, 734965, 735282 - check command line options only for yum
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.