Bug 41842 - write handle status after initialization
write handle status after initialization
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-3-errata
Assigned To: Philipp Hahn
Stefan Gohmann
:
Depends on:
Blocks: 42573 42725
  Show dependency treegraph
 
Reported: 2016-07-22 12:39 CEST by Felix Botner
Modified: 2016-10-21 10:59 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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:
hahn: Patch_Available+


Attachments
Write state after init - compiles but otherwise untested (7.51 KB, patch)
2016-07-22 12:42 CEST, Philipp Hahn
Details | Diff
41842.diff (3.01 KB, patch)
2016-10-17 14:50 CEST, Philipp Hahn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2016-07-22 12:39:01 CEST
At the moment the handler state files (/var/lib/univention-directory-listener/handlers/) are only written on reload/exit.

At least univention-directory-listener-ctrl resync has a problem with that

(1) univention-directory-listener-ctrl resync
 * checks if state file exists
 * removes state file
 * restarts listener

(2) univention-directory-listener-ctrl resync
 * state file still gone
 * resync fails because state file does not exist

So the first resync works, but after that any additional resync fails until the listener is restarted/reloaded.


In general, it would be a good idea to write the handle state files more often.
Comment 1 Philipp Hahn univentionstaff 2016-07-22 12:42:16 CEST
Created attachment 7825 [details]
Write state after init - compiles but otherwise untested
Comment 2 Philipp Hahn univentionstaff 2016-07-22 12:45:25 CEST
Change of behavior introduced by r69892 | Bug #3490 UDL: Improve listener-ctrl:
 The script now checks for the existing file before shutting down UDL. As the file is already deleted, UDL is not restarted anymore, after which it would re-init the handler as its state file is still missing.
Comment 3 Philipp Hahn univentionstaff 2016-10-14 14:23:40 CEST
r73215 | Bug #41842 listener: Fix handler init
r73214 | Bug #41842 listener: Write handler state after init
r73213 | Bug #41842 listener: Extract code to write handler state
r73212 | Bug #41842 listener: Convert handler state to enum
r73211 | Bug #41842 listener: Remove unused macros

Package: univention-directory-listener
Version: 10.0.0-17.333.201610141332
Version: 10.0.0-17.334.201610141418
Branch: ucs_4.1-0
Scope: errata4.1-3

r73229 | Bug #41842 listener: Fix handler init
r73228 | Bug #41842 listener: Write handler state after init
r73227 | Bug #41842 listener: Extract code to write handler state
r73226 | Bug #41842 listener: Convert handler state to enum
r73225 | Bug #41842 listener: Remove unused macros

r73242 | Bug #42328,Bug #41960,Bug #41842,Bug #42573 listener: YAML
 univention-directory-listener.yaml
Comment 4 Philipp Hahn univentionstaff 2016-10-17 14:50:21 CEST
Created attachment 8122 [details]
41842.diff

6393bd2 Bug #41842 listener: Fix handler init
bc32940 Bug #41842 listener: Write handler state after init
33f9db5 Bug #41842 listener: Extract code to write handler state
0e162ef Bug #41842 listener: Convert handler state to enum
Comment 5 Stefan Gohmann univentionstaff 2016-10-20 07:08:52 CEST
Tests: OK, looks good now.

Code review: OK

UCS 4.2 merge: OK

YAML: OK
Comment 6 Janek Walkenhorst univentionstaff 2016-10-20 12:40:23 CEST
<http://errata.software-univention.de/ucs/4.1/311.html>