Description of problem: Registering a certain system causes 500 Internal Server error. This appears to be due to an interface on the client system that has no IP address. Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/spacewalk/server/apacheRequest.py", line 129, in call_function response = func(*params) File "/usr/share/rhn/server/handlers/xmlrpc/registration.py", line 1030, in add_hw_profile if primif: UnboundLocalError: local variable 'primif' referenced before assignment Version-Release number of selected component (if applicable): spacewalk-backend-xmlrpc-2.4.23-1.el6.noarch How reproducible: Always This change fixes the problem for me: --- /usr/share/rhn/server/handlers/xmlrpc/registration.py.orig 2016-02-17 14:02:46.742891028 -0800 +++ /usr/share/rhn/server/handlers/xmlrpc/registration.py 2016-02-17 13:40:28.343527458 -0800 @@ -1011,6 +1011,7 @@ if row: ipaddr=row['ipaddr'] ip6addr=row['ip6addr'] + primif = None if ipaddr: h = rhnSQL.prepare(""" select interface_id from rhnServerNetAddress4 where address = :address
spacewalk.git(master): 2ac5a69c7f3a5c3034223f7bdf7914557846b082
Spacewalk 2.5 was released.
This BZ closed some time during 2.5, 2.6 or 2.7. Adding to 2.7 tracking bug.