Bug 29399 - samba/shares.conf sollte nicht erst im postrun aktualisiert werden
samba/shares.conf sollte nicht erst im postrun aktualisiert werden
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.2
Assigned To: Tobias Peters
Arvid Requate
: interim-1
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-26 17:02 CET by Arvid Requate
Modified: 2013-11-19 06:44 CET (History)
1 user (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:


Attachments
Vorschlag für einen Patch (1.96 KB, patch)
2012-11-26 17:02 CET, Arvid Requate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2012-11-26 17:02:13 CET
Bei ucs-test samba fiel auf, dass man kurze Zeit nach Löschen eines shares in UDM Fehler beim Aufruf von samba client tools Fehlermeldungen erhält, die darauf Hinweisen, dass die smb.conf nicht korrekt ausgewertet werden kann. ein strace zeigte:

stat("/etc/samba/shares.conf.d/E5upV01D", 0x7fff0e0ec3c0) = -1 ENOENT (No such file or directory)

Die Ursache scheint zu sein, dass das samba-shares Listenermodul im Handler direkt share-Definitionsdateien löscht/anlegt, aber die shares.conf erst im postrun aktualisiert, direkt vor dem samba reload. Es wäre konsistenter, die shares.conf direkt zu aktualisieren, falls es notwendig ist.
Comment 1 Arvid Requate univentionstaff 2012-11-26 17:02:44 CET
Created attachment 4838 [details]
Vorschlag für einen Patch
Comment 2 Tobias Peters univentionstaff 2013-04-22 17:02:57 CEST
Die shares.conf wird nun direkt im Handler aktualisiert. Samba-tool wirft nun nicht mehr den Fehler.
Comment 3 Stefan Gohmann univentionstaff 2013-05-24 08:41:53 CEST
Wie besprochen, jetzt tritt der folgender Fehler in der listener.log auf:

Traceback (most recent call last):
  File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 
235, in handler
    print >>fp, 'include = %s' % os.path.join('/etc/samba/shares.conf.d', f)
ValueError: I/O operation on closed file
Comment 4 Tobias Peters univentionstaff 2013-05-27 16:02:55 CEST
(In reply to comment #3)
> Wie besprochen, jetzt tritt der folgender Fehler in der listener.log auf:
> 
> Traceback (most recent call last):
>   File "/usr/lib/univention-directory-listener/system/samba-shares.py", line 
> 235, in handler
>     print >>fp, 'include = %s' % os.path.join('/etc/samba/shares.conf.d', f)
> ValueError: I/O operation on closed file

Der Fehler tritt nun nicht mehr auf.
Comment 5 Moritz Muehlenhoff univentionstaff 2013-05-31 10:44:34 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 6 Arvid Requate univentionstaff 2013-06-24 17:18:08 CEST
Maybe we should update shares.conf in an atomic operation, see patch proposal for Bug 31800.
Comment 7 Tobias Peters univentionstaff 2013-07-10 16:50:13 CEST
Now, shares.conf is updated in an atomic operation
Comment 8 Arvid Requate univentionstaff 2013-07-15 16:52:56 CEST
Ok.
Comment 9 Stefan Gohmann univentionstaff 2013-11-19 06:44:10 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".