Bug #53204
closed
mgr/telemetry: fix waiting for mgr to warm up
Added by Yaarit Hatuka over 2 years ago.
Updated almost 2 years ago.
Category:
telemetry module
Backport:
pacific, octopus
Affected Versions:
Ceph - v15.2.1,
Ceph - v15.2.10,
Ceph - v15.2.11,
Ceph - v15.2.12,
Ceph - v15.2.13,
Ceph - v15.2.14,
Ceph - v15.2.15,
Ceph - v15.2.16,
Ceph - v15.2.2,
Ceph - v15.2.3,
Ceph - v15.2.4,
Ceph - v15.2.5,
Ceph - v15.2.6,
Ceph - v15.2.7,
Ceph - v15.2.8,
Ceph - v15.2.9,
Ceph - v16.0.0,
Ceph - v16.0.1,
Ceph - v16.1.0,
Ceph - v16.1.1,
Ceph - v16.2.0,
Ceph - v16.2.1,
Ceph - v16.2.2,
Ceph - v16.2.3,
Ceph - v16.2.4,
Ceph - v16.2.5,
Ceph - v16.2.6,
Ceph - v16.2.7
Description
1. The implementation of config_notify() in telemetry module sets the
flag for event, which is supposed to wake up the 'serve' thread whenever
a config option is changed. The problem is that we call config_notify()
at the beginning of serve(), before we enter its 'run' loop. This call
sets the event which cancels the 10 seconds wait for the mgr to warm up.
To fix this, we extract the logic of updating the config options to a
separate function (config_update_module_option()), and call it on
serve(), instead of config_notify().
2. We should always wait for the mgr to warm up here (10 seconds). In
case of a sporadic event (e.g. a config option change via CLI) the event
will be set, and wait will return immediately. We enforce this wait by
using time.sleep(10) instead of event.wait(10).
- Status changed from New to Fix Under Review
- Pull request ID set to 43864
- Status changed from Fix Under Review to Pending Backport
- Copied to Backport #53605: pacific: mgr/telemetry: fix waiting for mgr to warm up added
- Copied to Backport #53606: octopus: mgr/telemetry: fix waiting for mgr to warm up added
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF