Currently, we have OpenSearchUserManager.remove_users_and_roles, which removes users and roles that are not linked to system users or existing relations. The removal happens here.
This method is called in two different places: update status and client relation broken events. Now, removing the relation user and role makes sense, but we should only remove that user / role, not a generic clean-up. We should also remove the call from update_status.
Currently, we have
OpenSearchUserManager.remove_users_and_roles
, which removes users and roles that are not linked to system users or existing relations. The removal happens here.This method is called in two different places: update status and client relation broken events. Now, removing the relation user and role makes sense, but we should only remove that user / role, not a generic clean-up. We should also remove the call from
update_status
.