]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr: fix race between module load and notify 37844/head
authorMykola Golub <mgolub@suse.com>
Mon, 13 Jan 2020 08:36:39 +0000 (08:36 +0000)
committerNathan Cutler <ncutler@suse.com>
Tue, 27 Oct 2020 08:42:51 +0000 (09:42 +0100)
commitdd4a16011cb5cb1586d5e040471d7cfabc0b194a
tree794f22465a1fcf3776ef82287836af70df36bc8e
parent30a61c18ac0af459db7e71d62a7d7f198874dacb
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