Bug 31256 - /usr/sbin/univention-mount-homedir blocks parallel smbclient authentication
/usr/sbin/univention-mount-homedir blocks parallel smbclient authentication
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: General
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Janek Walkenhorst
Felix Botner
: interim-2
: 32284 (view as bug list)
Depends on:
Blocks: 32715
  Show dependency treegraph
 
Reported: 2013-05-02 10:11 CEST by Stefan Gohmann
Modified: 2013-11-19 06:44 CET (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
gohmann: Patch_Available+


Attachments
univention-mount-homedir.patch (1.47 KB, patch)
2013-05-02 10:11 CEST, Stefan Gohmann
Details | Diff
univention-mount-homedir-performance.patch (4.07 KB, patch)
2013-08-21 14:10 CEST, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2013-05-02 10:11:27 CEST
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.
Comment 1 Moritz Muehlenhoff univentionstaff 2013-05-31 10:45:04 CEST
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.
Comment 2 Arvid Requate univentionstaff 2013-08-21 14:09:16 CEST
*** Bug 32284 has been marked as a duplicate of this bug. ***
Comment 3 Arvid Requate univentionstaff 2013-08-21 14:10:50 CEST
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.
Comment 4 Janek Walkenhorst univentionstaff 2013-09-06 18:01:13 CEST
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.
Comment 5 Philipp Hahn univentionstaff 2013-09-25 16:32:38 CEST
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
Comment 6 Janek Walkenhorst univentionstaff 2013-09-26 17:18:22 CEST
(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?
Comment 7 Janek Walkenhorst univentionstaff 2013-09-27 15:06:27 CEST
(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.
Comment 8 Philipp Hahn univentionstaff 2013-09-27 19:51:48 CEST
OK: Code review as discussed
OK: logins as in comment #5
OK: ucs-test/51_samba4/35smbclient_auth cloned to Bug #32715
Comment 9 Felix Botner univentionstaff 2013-11-01 14:26:11 CET
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'
Comment 10 Janek Walkenhorst univentionstaff 2013-11-01 14:53:43 CET
(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)
Comment 11 Felix Botner univentionstaff 2013-11-01 15:13:07 CET
OK
Comment 12 Stefan Gohmann univentionstaff 2013-11-19 06:44:16 CET
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".