Project

General

Profile

Actions

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.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
telemetry module
Target version:
-
% Done:

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).


Related issues 2 (0 open2 closed)

Copied to mgr - Backport #53605: pacific: mgr/telemetry: fix waiting for mgr to warm upResolvedLaura FloresActions
Copied to mgr - Backport #53606: octopus: mgr/telemetry: fix waiting for mgr to warm upResolvedLaura FloresActions
Actions

Also available in: Atom PDF