Bug #53204
closedmgr/telemetry: fix waiting for mgr to warm up
0%
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).
Updated by Yaarit Hatuka over 2 years ago
- Status changed from New to Fix Under Review
- Pull request ID set to 43864
Updated by Yaarit Hatuka over 2 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Backport Bot over 2 years ago
- Copied to Backport #53605: pacific: mgr/telemetry: fix waiting for mgr to warm up added
Updated by Backport Bot over 2 years ago
- Copied to Backport #53606: octopus: mgr/telemetry: fix waiting for mgr to warm up added
Updated by Yaarit Hatuka almost 2 years ago
- Status changed from Pending Backport to Resolved