Bug 734492 - Package Manager GUI forces re-register of system even if registered correctly
Summary: Package Manager GUI forces re-register of system even if registered correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum-rhn-plugin
Version: 5.7
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Milan Zázrivec
QA Contact: Martin Minar
URL:
Whiteboard:
: 735246 (view as bug list)
Depends On:
Blocks: 736250
TreeView+ depends on / blocked
 
Reported: 2011-08-30 15:09 UTC by Jack Waterworth
Modified: 2018-11-27 21:25 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 06:29:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 61962 0 None None None Never
Red Hat Product Errata RHBA-2012:0162 0 normal SHIPPED_LIVE yum-rhn-plugin bug fix update 2012-02-20 15:07:13 UTC

Description Jack Waterworth 2011-08-30 15:09:05 UTC
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):
yum-rhn-plugin-0.5.4-22.el5_7.1


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 23:57:08 UTC
Related issue: https://bugzilla.redhat.com/show_bug.cgi?id=734965

Comment 4 Milan Zázrivec 2011-09-02 16:16:01 UTC
Here's what's going on.

Here's the piece of code from pup, which decides whether it needs to run
rhn_register:


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
        return


So:
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 Zázrivec 2011-09-02 16:49:15 UTC
*** Bug 735246 has been marked as a duplicate of this bug. ***

Comment 6 Michael Mráka 2011-09-05 08:39:50 UTC
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 06:29:02 UTC
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.

http://rhn.redhat.com/errata/RHBA-2012-0162.html


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