Actions
Bug #47329
closedmgr plugins might endlessly loop when unregistering rados/cephfs client isntan
% Done:
0%
Source:
Tags:
Backport:
octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Problematic part in PyModuleRegistry::unregister_client():
void unregister_client(std::string_view name, const entity_addrvec_t& addrs) { auto itp = clients.equal_range(std::string(name)); for (auto it = itp.first; it != itp.second; ++it) { if (it->second == addrs) { it = clients.erase(it); } } }
The iterator gets incremented even after removing an entry from the map (which returns the next iterator).
This causes calls to unregister_client() to endlessly loop causing ceph-mgr to become unresponsive and getting blocklisted causing subsequent commands to hang.
Actions