Project

General

Profile

Actions

Bug #21340

open

mgr modules without serve threads cannot receive notifications

Added by John Spray over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
python interface
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Actions

Also available in: Atom PDF