Bug #21340
openmgr modules without serve threads cannot receive notifications
0%
Description
Originally any module would receive notifications, but during development of the prometheus module it was causing issues that we sent notifications to modules that had shut down, so this check was added:
commit f4bc4f64ad2d7a30d5e91c0ba4b75440a99464d0 Author: Dan Mick <dan.mick@redhat.com> Date: Tue Apr 11 15:31:48 2017 -0700 ServeThread: add 'running' flag, don't notify non-running threads Signed-off-by: Dan Mick <dan.mick@redhat.com>
The correct behaviour is probably:
- for modules that implement serve, we should send them notifications until shutdown has been called and they return from serve_thread.
- for modules that don't implement serve, we should send them notifications until they have returned from call to shutdown().
Currently all modules have a serve method (it's on MgrModule), it's just a `pass` if they haven't overridden it. So to make all this work neatly we would need to either have some logic for detecting whether it's overridden, or have the method just not exist unless a module implements it, rather than it being defined in MgrModule.
No data to display