mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6303 [Automation] [UI] Account creation hang in UI
Changes: - Caused due to a MySql error during 'Project' account cleanup. The MySql error hits a deadlock bug in the MessageBus code that does not release the lock/decrement the counter Eventually all callers on the MessageBus end up waiting to enter - This fixes the account cleanup MySql error.
This commit is contained in:
parent
0879ab812e
commit
4e61e49143
|
|
@ -660,8 +660,10 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
|
|||
// delete the account from project accounts
|
||||
_projectAccountDao.removeAccountFromProjects(accountId);
|
||||
|
||||
//delete the account from group
|
||||
_messageBus.publish(_name, MESSAGE_REMOVE_ACCOUNT_EVENT, PublishScope.LOCAL, accountId);
|
||||
if (account.getType() != Account.ACCOUNT_TYPE_PROJECT) {
|
||||
// delete the account from group
|
||||
_messageBus.publish(_name, MESSAGE_REMOVE_ACCOUNT_EVENT, PublishScope.LOCAL, accountId);
|
||||
}
|
||||
|
||||
// delete all vm groups belonging to accont
|
||||
List<InstanceGroupVO> groups = _vmGroupDao.listByAccountId(accountId);
|
||||
|
|
|
|||
|
|
@ -147,6 +147,9 @@ public class IAMServiceImpl extends ManagerBase implements IAMService, Manager {
|
|||
|
||||
List<Long> groupIds = _aclGroupAccountMapDao.customSearch(groupSc, null);
|
||||
|
||||
if (groupIds == null || groupIds.isEmpty()) {
|
||||
return new ArrayList<IAMGroup>();
|
||||
}
|
||||
SearchBuilder<IAMGroupVO> sb = _aclGroupDao.createSearchBuilder();
|
||||
sb.and("ids", sb.entity().getId(), Op.IN);
|
||||
SearchCriteria<IAMGroupVO> sc = sb.create();
|
||||
|
|
|
|||
Loading…
Reference in New Issue