Michael Kefeder wrote:
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
I think we already fixed this. Are you using the newest client code?
http://git.fedorahosted.org/git/spacewalk.git?p=spacewalk.git;a=blob;f=client/rhel/rhn-client-tools/src/up2date_client/hardware.py;h=d9f4269fbbba97cd702b1e6b0c0ded916a10765d;hb=7f971c06de2ac869c138791252dd70d1496a3c78
878 def get_hal_smbios():
879 try:
880 computer = get_hal_computer()
881 props = computer.GetAllProperties()
882 except:
883 log = up2dateLog.initLog()
884 msg = "Error reading smbios information: %s\n" %
(sys.exc_type)
885 log.log_debug(msg)
886 return {}
887 smbios = {}
888 for key in props:
889 if key.startswith('smbios'):
890 smbios[str(key)] = props[str(key)]
891 return smbios
Thanks,
Cliff
regards
Mike
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel
_______________________________________________
Spacewalk-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-devel