]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/progress: enforced try and except on accessing event dictionary 44672/head
authorKamoltat <ksirivad@redhat.com>
Wed, 12 Jan 2022 02:41:01 +0000 (02:41 +0000)
committerKamoltat <ksirivad@redhat.com>
Wed, 19 Jan 2022 21:27:21 +0000 (21:27 +0000)
commit53597d8fc2edf240438b49584a4b8e9a720ab9ae
tree90b84f2dcd4e61949171e9cb437cf08e9f2c627a
parent0fc11188b028fcc24f47aae9403a463e92249960
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)

Conflicts:
src/pybind/mgr/progress/module.py - trivial-fix
src/pybind/mgr/progress/module.py