Bug 734492 - Package Manager GUI forces re-register of system even if registered correctly
Package Manager GUI forces re-register of system even if registered correctly
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin (Show other bugs)
All Linux
urgent Severity high
: rc
: ---
Assigned To: Milan Zazrivec
Martin Minar
: Regression, ZStream
: 735246 (view as bug list)
Depends On:
Blocks: 736250
  Show dependency treegraph
Reported: 2011-08-30 11:09 EDT by Jack Waterworth
Modified: 2016-07-03 20:56 EDT (History)
17 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-02-21 01:29:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 61962 None None None Never

  None (edit)
Description Jack Waterworth 2011-08-30 11:09:05 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):

How reproducible:
Every time

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
Actual results:
RHN Registration process is started with warning that the machine is already registered

Expected results:
Package Updater displays out-of-date packages eligible for upgrade.

Additional info:
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.
Comment 2 Mark Huth 2011-08-31 19:57:08 EDT
Related issue: https://bugzilla.redhat.com/show_bug.cgi?id=734965
Comment 4 Milan Zazrivec 2011-09-02 12:16:01 EDT
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
in init_hook().

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
Comment 5 Milan Zazrivec 2011-09-02 12:49:15 EDT
*** Bug 735246 has been marked as a duplicate of this bug. ***
Comment 6 Michael Mráka 2011-09-05 04:39:50 EDT
The issue has been fixed in spacewalk master by
commit e429437bd77eda75a76a3a52f72d744b54c30c37
    734492, 734965, 735282 - check command line options only for yum
Comment 11 errata-xmlrpc 2012-02-21 01:29:02 EST
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.


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