Univention Bugzilla – Bug 31256
/usr/sbin/univention-mount-homedir blocks parallel smbclient authentication
Last modified: 2013-11-19 06:44:16 CET
Created attachment 5210 [details] univention-mount-homedir.patch root@master501:~# /usr/share//ucs-test/51_samba4/35smbclient_auth -f Object created: uid=Tdae64d03b0c,cn=users,dc=deadlock50,dc=local Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT session setup failed: NT_STATUS_IO_TIMEOUT Using username "Tdae64d03b0c" 3 of 24 have been successfull. Object removed: uid=Tdae64d03b0c,cn=users,dc=deadlock50,dc=local Starting 1 ucs-test at 2013-02-27 16:09:27 to /dev/null Check whether several parallel smbclient authentifications are possible......................................................................................................................................... Test failed root@master501:~# ucr set homedir/mount=false root@master501:~# /usr/share//ucs-test/51_samba4/35smbclient_auth -f Object created: uid=Tee1713bdf6b,cn=users,dc=deadlock50,dc=local Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Domain=[DEADLOCK50] OS=[Unix] Server=[Samba 4.0.3] Using username "Tee1713bdf6b" 24 of 24 have been successfull. Object removed: uid=Tee1713bdf6b,cn=users,dc=deadlock50,dc=local Starting 1 ucs-test at 2013-02-27 16:10:00 to /dev/null Check whether several parallel smbclient authentifications are possible......................................................................................................................................... Test passed root@master501:~# The attached patch changes "ucr shell" to "ucs get" which increases the performance.
We will not ship a UCS 3.1-2 release; the next UCS release will be UCS 3.2. As such, this bug is moved to the new target milestone.
*** Bug 32284 has been marked as a duplicate of this bug. ***
Created attachment 5388 [details] univention-mount-homedir-performance.patch Some more changes in this direction. Maybe it would be good to rewrite the code in python.
univention-home-mounter 5.0.1-2 The code was converted to Python and the performance improved from 400-800 ms to 80-140 ms Obsolete logic for thin clients was removed. Log messages now begin with "univention-mount-homedir" instead of "logger" and have been improved. Changelog updated.
RFA: Code review as discussed: mounted_directories() → os.path.ismount() Bug #27825 mount_source(): unused readlink_f() → os.path.samefile() os.access() → os.path.exists() parse_automount(): handle autofs option parsing OK: passwd.home == ldap.automountInformation OK: passwd.home != ldap.automountInformation OK: first login: mkdir+mount OK: re-login while still mounted OK: re-login after previous unount OK: ChangeLog FAIL: /usr/share/ucs-test/53_samba-common/35smbclient_auth -f
(In reply to Philipp Hahn from comment #5) > RFA: Code review as discussed: > mounted_directories() → os.path.ismount() Bug #27825 > mount_source(): unused > readlink_f() → os.path.samefile() > os.access() → os.path.exists() > parse_automount(): handle autofs option parsing Applied as discussed: 5.0.1-3 > FAIL: /usr/share/ucs-test/53_samba-common/35smbclient_auth -f How to reproduce?
(In reply to Janek Walkenhorst from comment #6) > > FAIL: /usr/share/ucs-test/53_samba-common/35smbclient_auth -f > How to reproduce? This seems to be a problem with the test, not the changes to univention-mount-homedir.
OK: Code review as discussed OK: logins as in comment #5 OK: ucs-test/51_samba4/35smbclient_auth cloned to Bug #32715
su nobody on an unjoined system fails (needed for univention-system-setup-boot). -> USER=nobody /usr/sbin/univention-mount-homedir Traceback (most recent call last): File "/usr/sbin/univention-mount-homedir", line 148, in <module> main() File "/usr/sbin/univention-mount-homedir", line 130, in main homeattr = get_homeattr(user.pw_name) File "/usr/sbin/univention-mount-homedir", line 60, in get_homeattr connection = univention.uldap.getMachineConnection(ldap_master=False) File "/usr/lib/pymodules/python2.6/univention/uldap.py", line 96, in getMachineConnection bindpw=open(secret_file).read() IOError: [Errno 2] No such file or directory: '/etc/machine.secret'
(In reply to Felix Botner from comment #9) > IOError: [Errno 2] No such file or directory: '/etc/machine.secret' univention-home-mounter (5.0.1-4)
OK
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".