Repository: cloudstack Updated Branches: refs/heads/master 81b4731e3 -> 15c4851fc
LOUDSTACK-6475: cleanupVPC task - removed the transaction wrapping up multiple VPC destroy as the destroy operation has external calls, to prevent long-locked transaction. Reviewed-by: Prachi Damle Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15c4851f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15c4851f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15c4851f Branch: refs/heads/master Commit: 15c4851fc9b43ef0ff909987f97d4d53d1ac2738 Parents: 81b4731 Author: Alena Prokharchyk <alena.prokharc...@citrix.com> Authored: Fri May 2 13:47:13 2014 -0700 Committer: Alena Prokharchyk <alena.prokharc...@citrix.com> Committed: Fri May 2 14:20:38 2014 -0700 ---------------------------------------------------------------------- server/src/com/cloud/network/vpc/VpcManagerImpl.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15c4851f/server/src/com/cloud/network/vpc/VpcManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/vpc/VpcManagerImpl.java b/server/src/com/cloud/network/vpc/VpcManagerImpl.java index 5263d56..3e20cfe 100644 --- a/server/src/com/cloud/network/vpc/VpcManagerImpl.java +++ b/server/src/com/cloud/network/vpc/VpcManagerImpl.java @@ -35,8 +35,6 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.log4j.Logger; - import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.api.command.user.vpc.ListPrivateGatewaysCmd; @@ -46,6 +44,7 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe import org.apache.cloudstack.framework.config.ConfigDepot; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContextRunnable; +import org.apache.log4j.Logger; import com.cloud.configuration.Config; import com.cloud.configuration.ConfigurationManager; @@ -130,7 +129,6 @@ import com.cloud.utils.db.Transaction; import com.cloud.utils.db.TransactionCallback; import com.cloud.utils.db.TransactionCallbackNoReturn; import com.cloud.utils.db.TransactionCallbackWithException; -import com.cloud.utils.db.TransactionCallbackWithExceptionNoReturn; import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.ExceptionUtil; @@ -2159,9 +2157,6 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis } try { - Transaction.execute(new TransactionCallbackWithExceptionNoReturn<Exception>() { - @Override - public void doInTransactionWithoutResult(TransactionStatus status) throws Exception { // Cleanup inactive VPCs List<VpcVO> inactiveVpcs = _vpcDao.listInactiveVpcs(); s_logger.info("Found " + inactiveVpcs.size() + " removed VPCs to cleanup"); @@ -2169,8 +2164,6 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis s_logger.debug("Cleaning up " + vpc); destroyVpc(vpc, _accountMgr.getAccount(Account.ACCOUNT_ID_SYSTEM), User.UID_SYSTEM); } - } - }); } catch (Exception e) { s_logger.error("Exception ", e); } finally {