Bug 46486

Summary: sysvol-sync.sh: process lock doesn't work as intended.
Product: UCS Reporter: Eduard Mai <mai>
Component: Samba4Assignee: Felix Botner <botner>
Status: CLOSED FIXED QA Contact: Arvid Requate <requate>
Severity: normal    
Priority: P5 CC: gohmann, requate
Version: UCS 4.2   
Target Milestone: UCS 4.3-0-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: Bug Report What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 3: Will affect average number of installed domains How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.103 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:

Description Eduard Mai univentionstaff 2018-03-05 11:50:51 CET
Line 327f in sysvol-sync.sh: 
# get a lock, prevent script from running twice
flock -un 9 || exit 0

-u drops a lock ("unlock") on the given file descriptor.

To reproduce add a read after the flock command and run sysvol-sync.sh 2 times. Two processes should wait for input. Removing the -u option makes all subsequent processes exit as intended.
Comment 1 Arvid Requate univentionstaff 2018-03-05 13:07:17 CET
uh, bummer.
Comment 2 Stefan Gohmann univentionstaff 2018-03-15 06:36:57 CET
Move to 4.3-0-errata. If a UCS 4.2 backport is needed, please clone this issue.
Comment 3 Felix Botner univentionstaff 2018-03-19 17:27:07 CET
univention-samba4: 68c51de421b52458b48143973a8c8fa4bd55ffba
removed -u from flock

yaml: 5b02ac00e9cad9642eeb4498b0af310d19a26492
Comment 4 Arvid Requate univentionstaff 2018-03-22 13:23:03 CET
Ok, works now.
Comment 5 Arvid Requate univentionstaff 2018-03-28 13:28:37 CEST
<http://errata.software-univention.de/ucs/4.3/5.html>