]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: fix race between module load and notify 35794/head
authorMykola Golub <mgolub@suse.com>
Mon, 13 Jan 2020 08:36:39 +0000 (08:36 +0000)
committerLaura Paduano <lpaduano@suse.com>
Fri, 26 Jun 2020 11:25:47 +0000 (13:25 +0200)
commitc82f229f90f235d41357428cf3f807c2104a5c45
treec3b9940a06bfe02e44d7928613a40f902e6e51cb
parentec03ea106bfc42135c54e7f8444c5b207d5120d9
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>
(cherry picked from commit 56e34f58cb7a84439c53779467b2d5b495beb3ef)
src/mgr/ActivePyModules.cc
src/mgr/StandbyPyModules.cc