Univention Bugzilla – Bug 34341
Disable listener module processing
Last modified: 2020-07-03 20:55:14 CEST
Sometimes a listener module needs to be disabled, either because some required configuration is not yet done or because of some temporary problem.
1. Currently modules either ignore this and crash (Bug #34108), which leads to changes not being processed until a manual "univention-directory-listener-ctrl resync" is done.
2. Or modules implement their own log to persistently store the changes for later processing (Ticket #2012050221003422, Ticket #2013052921001364).
The first case could be solved by allowing handler_initialize() to return an error code, which would leave the modules as !HANDLER_READY.
On the next restart of the Listener if module would then be tried again.
For the second case see handler_exec(), which can return !=0, but its return-value is ignored everywhere.
PS: handlers_initialize_all() is unused.
Re-setting the bug classification. As far as I understand it is more a general improvement.
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4.
If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
One scenario which I have encountered is, that something external to the listener module ("environmental") is not ready. For example missing data, because a wizard has not run yet: gapps- and office365-connectors have this.
Those two deal with it, by simply ignoring all requests, until they have all necessary data. Thus they may miss an activated user. → 1.
The OX-listeners do 2.
a) It would be nice if the listener could queue jobs for deactivated listener modules.
b) The proposed API of Bug #44786 offers ListenerModuleConfiguration.get_active() → bool (should be is_active...) which by default maps to !ucr.is_true(listener/module/<name>/deactivate). The gapps- and office365-connectors would overwrite this method to instead check their api-token-state.
This issue has been filed against UCS 4.2.
UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.
If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.