Skip to content

Commit a080eb8

Browse files
author
Daan Hoogland
committed
move clearing operational table
1 parent cbe2c0d commit a080eb8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

server/src/main/java/com/cloud/user/AccountManagerImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,11 +1120,6 @@ public int compare(NetworkVO network1, NetworkVO network2) {
11201120
accountCleanupNeeded = true;
11211121
}
11221122
}
1123-
// this is clearing the operational reservations or vlans for the account
1124-
// this should have happened before and covers up the release issues for the vlans
1125-
// but as it is purely operational and no business logic is involved we clean now
1126-
// as a last resort, to prevent allocation issue on the long run.
1127-
_dataCenterVnetDao.releaseForAccount(accountId);
11281123
}
11291124

11301125
// Delete Site 2 Site VPN customer gateway
@@ -1162,6 +1157,11 @@ public int compare(NetworkVO network1, NetworkVO network2) {
11621157
for (AccountGuestVlanMapVO map : maps) {
11631158
_dataCenterVnetDao.releaseDedicatedGuestVlans(map.getId());
11641159
}
1160+
// this is clearing the operational reservations or vlans for the account
1161+
// this should have happened before and covers up the release issues for the vlans
1162+
// but as it is purely operational and no business logic is involved we clean now
1163+
// as a last resort, to prevent allocation issue on the long run.
1164+
_dataCenterVnetDao.releaseForAccount(accountId);
11651165
int vlansReleased = _accountGuestVlanMapDao.removeByAccountId(accountId);
11661166
logger.info("deleteAccount: Released {} dedicated guest vlan ranges from account {}", vlansReleased, account);
11671167

0 commit comments

Comments
 (0)