Hi List

we recently ran into some problems with systems whose smbios information with rhnreg_ks was None. Here's our call and the errorlog:

# rhnreg_ks --serverUrl=http://spacewalk.ourdomain.com/XMLRPC --activationkey=1-server

log:

exceptions.TypeError: cannot marshal None unless allow_none is enabled

There is also a warning:

up2date Warning: haldaemon or messagebus service not running. Cannot probe hardware and DMI information.

This warning popped up on every machine, but it didn't cause any troubles on almost every of our systems. A few however died with the error message from above.

I think the best fix would be to raise the errorlevel of get_hal_smbios()s exception message from debug to fatal or something, because else it'll return None and keep the system from registering with spacewalk without really informing the user why it did not work. Starting haldaemon fixes the problem, but since it is only mentioned as a warning, that also shows on every other machine, it didn't occur to us that this was the problem.

Suggested fix:

/usr/share/rhn/up2date_client/hardware.py

def get_hal_smbios():
    try:
        computer = get_hal_computer()
        props = computer.GetAllProperties()
    except:
        log = up2dateLog.initLog()
        msg = "Error reading smbios information: %s\n" % (sys.exc_type)
        log.log_me(msg)
        return
    smbios = {}
    for key in props:
        if key.startswith('smbios'):
            smbios[str(key)] = props[str(key)]
    return smbios

regards
 Mike

_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to