Bug 532145

Summary: rhnregGui.py Line 949 in populateProfile: local variable 'ipaddr' referenced before assignment
Product: [Community] Spacewalk Reporter: Miroslav Suchý <msuchy>
Component: ClientsAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: low    
Version: 0.7CC: David.Sieving
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 530659 Environment:
Last Closed: 2009-12-07 12:03:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 530659    
Bug Blocks: 507670    

Description Miroslav Suchý 2009-10-30 21:09:34 UTC
+++ This bug was initially created as a clone of Bug #530659 +++

Description of problem:

    Unable to register RedHat 5 Enterprise Server for software updates.

Version-Release number of selected component (if applicable):

    /usr/share/rhn/up2date_client/rhnregGui.py

How reproducible:

    Configure /etc/sysconfig to enable firstboot.
    Follow the prompts and attempt to register for updates.
    run 'yum update'

Steps to Reproduce:

    cp -pr /etc/sysconfig/firstboot /etc/sysconfig/firstboot.bak
    rm /etc/sysconfig/firstboot
    chkconfig --list firstboot
    chkconfig --level 35 firstboot on
    chkconfig --list firstboot
    shutdown -r now
    (Follow the prompts and attempt to register for updates)
    yum update
  
Actual results (in /var/log/up2date):

    up2date 
    Traceback (most recent call last):
      File "/usr/share/rhn/up2date_client/rhnregGui.py", line 949, in populateProfile
        if ipaddr:
    exceptions.UnboundLocalError: local variable 'ipaddr' referenced before assignment

Actual results (on 'yum update'):

    Loaded plugins: rhnplugin, security
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-i386-server-5. Please verify its path and try again

Expected results:

    Successful registration for software updates.
    Successful execution of 'yum update'

Additional info:

Comment 1 Miroslav Suchý 2009-10-30 21:12:36 UTC
This happen when hostname is not set and hardware profile is not sent to rhnServer.

Comment 2 Miroslav Suchý 2009-10-30 21:16:50 UTC
Commited as 3dab836b0f7f4da095daec5c9618dd52f635dacd

Comment 3 Miroslav Suchý 2009-12-07 12:03:04 UTC
Spacewalk 0.7 released.