Github user serg38 commented on the issue: https://github.com/apache/cloudstack/pull/1762 @rafaelweingartner Thanks a lot. I totally agree that resetting hosts doesn't really need to be a part of transaction and should be extracted to a new method. The same is for lines 527-546, and then another one after 551 My understanding of agent LB is that is handled separately from reconnect part. I might be wrong but it is done in ClusteredAgentManagerImpl by scheduling rebalancing task every 60 sec getAgentRebalanceScanTask which takes care of transferring of connected agents. @rhtyd @jburwell @koushik-das @karuturi Do you agree that we can split a transaction in findAndUpdateDirectAgentToLoad into 3 non transactional methods and thus eliminate a one side of a repeated deadlock? This is a very core of agent management that is very hard if ever possible to write smoke test. If so @nvazquez might be able to work on refactoring this method later this month
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---