]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/progress: enforced try and except on accessing event dictionary 44671/head
authorKamoltat <ksirivad@redhat.com>
Wed, 12 Jan 2022 02:41:01 +0000 (02:41 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 19 Jan 2022 15:34:06 +0000 (15:34 +0000)
commite22d0fd4799da1d3d91e53366b6d040e8cb8b222
treeffb723623e1f52f1be1a63db78b22a9e6817d2d2
parent7e035110784fba02ba81944e444be9a36932c6a3
pybind/mgr/progress: enforced try and except on accessing event dictionary

There is a certain race condition scenario where
an event gets deleted while the progress module
iterates through the ``events`` dictionary,
without a ``try and except``, this will cause
an unhandled exception error and will crash
the module.

This commit will enforce ``try and except``
on every part of the code where we are accessing
the ``events`` dictionary.

Fixes: https://tracker.ceph.com/issues/53803
Signed-off-by: Kamoltat <ksirivad@redhat.com>
(cherry picked from commit b70d4a9caae0eb859e10b68f93573d507625d267)
src/pybind/mgr/progress/module.py