Bug 26089 - Make execution order of listener modules definable
Summary: Make execution order of listener modules definable
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
Version: UCS 4.1
Hardware: Other Linux
: P5 enhancement
Target Milestone: UCS 5.0-0-errata
Assignee: Philipp Hahn
QA Contact: Dirk Wiesenthal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-10 16:37 CET by Tim Petersen
Modified: 2021-12-01 16:29 CET (History)
4 users (show)

See Also:
What kind of report is it?: Feature Request
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):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Petersen univentionstaff 2012-02-10 16:37:07 CET
Angefragt an http://forum.univention.de/viewtopic.php?f=48&t=1732:
"
ich will ein neues Listener-Modul schreiben, das immer nach einem anderen Listener-Modul gestartet werden soll. Eigentlich könnte ich die Erweiterung an das bestehende Modul anhängen, aber ich will die Original-Module nicht ändern, da es sonst Probleme beim Update geben kann.
"
Comment 1 Felix Botner univentionstaff 2016-07-26 15:04:09 CEST
Wird auch für die Briox App benötigt.

Zur Zeit kann man keinen Benutzer mit "Briox User=Yes" anlegen.

Grund:
der Briox Handler (ändert bestehende OX Benutzer) wird immer vor dem OX Hanlder aufgerufen (diese legt der OX Benutzer erst an).

Man müsste in diesem Szenario also dafür sorgen, dass der briox Handler immer nach dem ox handler gestartet wird.

Workaround.
Zunächst den OX Benutzer anlegen (ohne Briox). Dann bei bestehendem Benutzer briox aktivieren.
Comment 2 Arvid Requate univentionstaff 2016-07-26 18:54:55 CEST
Just to make English bug searches work too:

Currently the order of execution of listener modules is not configurable (only replication.py is always run first).
Comment 3 Stefan Gohmann univentionstaff 2019-01-03 07:18:01 CET
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018.

Customers still on UCS 4.1 are encouraged to update to UCS 4.3. Please contact
your partner or Univention for any questions.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Comment 4 Philipp Hahn univentionstaff 2021-11-15 13:00:36 CET
We have a use-case for this now in 5.0-0 and 4.4-8: https://git.knut.univention.de/groups/univention/dev-issues/-/epics/9

Package: univention-directory-listener
Version: 14.0.5-4A~5.0.0.202111151258
Branch: ucs_5.0-0
Scope: errata5.0-0

[5.0-0] eac58f1f28 Bug #26089: univention-directory-listener 14.0.5-4A~5.0.0.202111151258
 doc/errata/staging/univention-directory-listener.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[5.0-0] d37fc0cd17 refactor[UDL] Remove unused HANDLER_PREPARED
 management/univention-directory-listener/src/handlers.h | 1 -
 1 file changed, 1 deletion(-)

[5.0-0] 788005158b doc[UDL] Document priority
 doc/developer-reference/listener/listener.xml | 10 ++++++++++
 1 file changed, 10 insertions(+)

[5.0-0] 47d7df9aef doc[UDL] Add priority
 doc/errata/staging/univention-directory-listener.yaml     | 11 +++++++++++
 management/univention-directory-listener/debian/changelog |  6 ++++++
 2 files changed, 17 insertions(+)

[5.0-0] 82c1c7ffea feat[UDL] Add priority
 management/univention-directory-listener/src/handlers.c         | 58 +++++++++++----------------
 management/univention-directory-listener/src/handlers.h         |  5 +++
 .../tests/test__handlers__insert_handler.c                      | 62 +++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+), 35 deletions(-)
Comment 5 Philipp Hahn univentionstaff 2021-11-18 11:31:30 CET
[5.0-0] 40314e4bf5 Bug #26089: univention-directory-listener 14.0.5-5A~5.0.0.202111181129
 doc/errata/staging/univention-directory-listener.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[5.0-0] 0fde6e6fbf style[udl] Simplify dict and set ahndling
 management/univention-directory-listener/python/univention/listener/api_adapter.py        | 2 +-
 management/univention-directory-listener/python/univention/listener/handler.py            | 4 ++--
 .../univention-directory-listener/python/univention/listener/handler_configuration.py     | 2 +-
 management/univention-directory-listener/python/univention/listener/handler_logging.py    | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

[5.0-0] abb7e87bf8 feat[udl] Add priority to listener API
 doc/errata/staging/univention-directory-listener.yaml                                | 2 +-
 management/univention-directory-listener/debian/changelog                            | 6 ++++++
 management/univention-directory-listener/python/univention/listener/api_adapter.py   | 4 +++-
 .../python/univention/listener/handler_configuration.py                              | 9 +++++++++
 4 files changed, 19 insertions(+), 2 deletions(-)

[5.0-0] 9fd24e45a5 style[udl] Shellcheck
 .../univention-directory-listener/03univention-directory-listener.inst     | 18 +++++++++++-------
 .../etc/network/if-post-down.d/univention-directory-listener               |  2 +-
 management/univention-directory-listener/src/listener-ctrl                 | 16 ++++++++--------
 3 files changed, 20 insertions(+), 16 deletions(-)

[5.0-0] 64adb6ff2c test[udl] Shellcheck
 .../univention-directory-listener/debian/tests/add-source.sh    |   6 +-
 management/univention-directory-listener/debian/tests/lxc-ucs   | 147 ++++++++++++----------------
 management/univention-directory-listener/doc.34355/common.sh    |  18 ++--
 .../doc.34355/test01_create_regular                             |   1 +
 .../doc.34355/test02_create_filtered                            |   1 +
 .../doc.34355/test03_modify_regular                             |   1 +
 .../doc.34355/test04_modify_filtered                            |   1 +
 .../doc.34355/test05_rename_regular                             |   1 +
 .../doc.34355/test06_rename_filtered                            |   1 +
 .../doc.34355/test07_rename_oldrdn                              |   1 +
 ...
 34 files changed, 114 insertions(+), 98 deletions(-)

[5.0-0] d6e893b360 test[udl] Fix PEP 484 type errors
 .../univention-directory-listener/listener/ldap_server.py       |  10 ++-
 management/univention-directory-listener/python/listener.py     |   1 +
 management/univention-directory-listener/python/listener.pyi    |  44 -----------
 .../python/univention/listener/__init__.py                      |   1 +
 .../python/univention/listener/api_adapter.py                   |  24 +++++-
 .../python/univention/listener/api_adapter.pyi                  |  65 ----------------
 .../python/univention/listener/handler.py                       |  41 ++++++++--
 .../python/univention/listener/handler.pyi                      | 113 ----------------------------
 .../python/univention/listener/handler_configuration.py         |  29 +++++--
 .../python/univention/listener/handler_configuration.pyi        |  70 -----------------
 ...
 16 files changed, 134 insertions(+), 433 deletions(-)

[5.0-0] 6f7d33bf6e style[udl] Simplify sys.modules[__name__].__doc__
 management/univention-directory-listener/tools/get_notifier_id.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

[5.0-0] d38881e9ac style[udl] isort
 management/univention-directory-listener/listener/ldap_server.py                  |  4 ++--
 management/univention-directory-listener/tools/get_notifier_id.py                 |  8 +++++---
 management/univention-directory-listener/tools/resync-objects.py                  | 11 +++++++----
 management/univention-directory-listener/tools/univention-get-ldif-from-master.py |  9 +++++----
 4 files changed, 19 insertions(+), 13 deletions(-)

Package: univention-directory-listener
Version: 14.0.5-5A~5.0.0.202111181129
Branch: ucs_5.0-0
Scope: errata5.0-0

TODO: Backport to 4.4-8 via Bug #54061 after QA
Comment 6 Philipp Hahn univentionstaff 2021-11-18 15:29:59 CET
Package: univention-directory-listener
Version: 14.0.5-5A~5.0.0.202111181521
Branch: ucs_5.0-0
Scope: errata5.0-0

[5.0-0] 718504db30 Bug #26089: univention-directory-listener 14.0.5-5A~5.0.0.202111181521
 doc/errata/staging/univention-directory-listener.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

[5.0-0] 89a3a9a0d8 style[udl] Simplify dict and set ahndling
 management/univention-directory-listener/python/univention/listener/api_adapter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Philipp Hahn univentionstaff 2021-11-30 17:16:19 CET
[5.0-0] a0eef67066 refactor[replication]: move hard coded module ordering
 doc/errata/staging/univention-directory-listener.yaml        |  2 +-
 doc/errata/staging/univention-directory-replication.yaml     | 11 +++++++++++
 management/univention-directory-listener/debian/changelog    |  6 ++++++
 management/univention-directory-listener/debian/control      |  1 +
 management/univention-directory-listener/src/handlers.c      |  2 +-
 management/univention-directory-replication/debian/changelog |  6 ++++++
 management/univention-directory-replication/debian/control   |  2 +-
 management/univention-directory-replication/replication.py   |  2 ++
 8 files changed, 29 insertions(+), 3 deletions(-)

Package: univention-directory-replication
Version: 13.0.2-3A~5.0.0.202111301700
Branch: ucs_5.0-0
Scope: errata5.0-0

Package: univention-directory-listener
Version: 14.0.5-6A~5.0.0.202111301701
Branch: ucs_5.0-0
Scope: errata5.0-0

[5.0-0] 4498addbba Bug #26089: univention-directory-replication 13.0.2-3A~5.0.0.202111301700 Bug #26089: univention-directory-listener 14.0.5-6A~5.0.0.202111301701
 doc/errata/staging/univention-directory-listener.yaml    | 8 +++++---
 doc/errata/staging/univention-directory-replication.yaml | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)
Comment 8 Dirk Wiesenthal univentionstaff 2021-12-01 12:59:30 CET
Works just like in 4.4-8.

replication.py is still the first one with the new change