[Spacewalk-list] rhnreg_ks error during kickstart after update to 0.6 - smbios dbus_bindings.DBusException

Marco Giunta giunta at sissa.it
Tue Aug 18 16:29:21 UTC 2009


Hi at all,
after the update to Spacewalk 0.6, I' ve a serious problem with 
rhnreg_ks during kickstart. Before the update, during kickstart of 
Centos 5.3 [i386-x86_64], I registered the workstations with 
bootstrap.sh script. The command inside the script is:

/usr/sbin/rhnreg_ks --force --activationkey 1-centos5-i386

After the update, when the script run this command, it receives an 
exception:

An error has occurred:
dbus_bindings.DBusException
See /var/log/up2date for mare information

and content of the file /var/log/up2date is:

Traceback (most recent call last):
  File "/usr/sbin/rhnreg_ks", line 216, in ?
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 65, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhnreg_ks", line 145, in main
    other = other)
  File "/usr/share/rhn/up2date_client/rhnreg.py", line 427, in 
registerSystem
    auth_dict["smbios"] = hardware.get_hal_smbios()
  File "/usr/share/rhn/up2date_client/hardware.py", line 874, in 
get_hal_smbios
    computer = get_hal_computer()
  File "/usr/share/rhn/up2date_client/hardware.py", line 760, in 
get_hal_computer
    bus = dbus.SystemBus()
  File "/usr/lib/python2.4/site-packages/dbus/_dbus.py", line 260, in 
__new__
    return Bus.__new__(cls, Bus.TYPE_SYSTEM, use_default_mainloop, private)
  File "/usr/lib/python2.4/site-packages/dbus/_dbus.py", line 99, in __new__
    bus._connection = dbus_bindings.bus_get(bus_type, private)
  File "dbus_bindings.pyx", line 1692, in dbus_bindings.bus_get
dbus_bindings.DBusException: Failed to connect to socket 
/var/run/dbus/system_bus_socket: No such file or directory

rhnreg_ks tries to get smbios informations from dbus, but during 
kickstart process, the system doesn't run it. Looking in rhnreg_ks 
sources and devel mailing list, I suppose the problem is related to this 
patch:

http://www.mail-archive.com/spacewalk-devel@redhat.com/msg01451.html

with rhn-client-tools 0.4.24 (spacewalk 0.5), without the patch, I 
didn't have this problem. If I try to add and disable the option 
supportsSMBIOS in /etc/sysconfig/rhn/up2date, ( like trac revision of 
file root/client/rhel/rhn-client-tools/etc-conf/up2date.config on 
05/18/09 15:54:45), but rhnreg_ks completely ignore this option, and I 
don't know why !!!!! I think it happends, because it's forced to be 1 by 
the function workaroundMissingCaps(self) in the file 
/usr/share/rhn/up2date_client/capabilities.py.

I find a workaround by modify the line:

"registration.smbios": {"version" : "1"}}

to

"registration.smbios": {"version" : "0"}}

in /usr/share/rhn/up2date_client/capabilities.py. Anyboby knows a more 
elegant solution for this problem ???

Thank you in advance,
    Marco




More information about the Spacewalk-list mailing list