]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr: fix race between module load and notify 30670/head
authorMykola Golub <mgolub@suse.com>
Mon, 13 Jan 2020 08:36:39 +0000 (08:36 +0000)
committerMykola Golub <mgolub@suse.com>
Mon, 13 Jan 2020 08:36:39 +0000 (08:36 +0000)
commit56e34f58cb7a84439c53779467b2d5b495beb3ef
treec6180aba1270d54a2fd34ce5d8ff7d62122436f5
parentf996db6a143871746995fb72952a775d363067e3
mgr: fix race between module load and notify

When starting a module, there was a time window between we
registered the module in the module list and loaded it in the
finisher thread, when a notify could be delivered to not fully
initialized module.

We can avoid this by delaying registering the module in the
module list until it is successfully initialized.

Fixes: https://tracker.ceph.com/issues/41736
Signed-off-by: Mykola Golub <mgolub@suse.com>
src/mgr/ActivePyModules.cc
src/mgr/StandbyPyModules.cc