Univention Bugzilla – Bug 31764
samba/printers.conf* race condition
Last modified: 2013-11-19 06:42:04 CET
There is a race condition in the samba printers.conf handling while removing a printer. First the printers definition is removed /etc/samba/printers.conf.d/<printer> and 15 seconds later in the postrun the file /etc/samba/printers.conf is written. In the meanwhile smaba-tool throws an exception: root@master501:~# samba-tool user list ERROR(runtime): uncaught exception - Unable to load default file File "/usr/lib/python2.6/dist-packages/samba/netcmd/__init__.py", line 175, in _run return self.run(*args, **kwargs) File "/usr/lib/python2.6/dist-packages/samba/netcmd/user.py", line 233, in run lp = sambaopts.get_loadparm() File "/usr/lib/python2.6/dist-packages/samba/getopt.py", line 92, in get_loadparm self._lp.load_default() root@master501:~#
We might use a similar approach as for Bug #31800.
When changing a printer, /etc/samba/printers.conf is refreshed instantly and in an atomic operation
The patch needed to be revised, package currently builds.
The creation of /etc/samba/printers.conf now occurs by writing to /etc/samba/printers.conf.temp, which is then renamed to /etc/samba/printers.conf. Creation, modification and removal of printer shares was successfully tested. Changelog exists.
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".