_s2sVpnMgr.cleanupVpnConnectionByVpc(vpcId); s_logger.debug("Cleaning up existed site to site VPN gateways"); _s2sVpnMgr.cleanupVpnGatewayByVpc(vpcId);
@Override public void finalizeStop(final VirtualMachineProfile profile, final Answer answer) { super.finalizeStop(profile, answer); // Mark VPN connections as Disconnected final DomainRouterVO router = _routerDao.findById(profile.getId()); final Long vpcId = router.getVpcId(); if (vpcId != null) { _s2sVpnMgr.markDisconnectVpnConnByVpc(vpcId); } }
protected DomainRouterVO start(DomainRouterVO router, final User user, final Account caller, final Map<Param, Object> params, final DeploymentPlan planToDeploy) throws StorageUnavailableException, InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException { s_logger.debug("Starting router " + router); try { _itMgr.advanceStart(router.getUuid(), params, planToDeploy, null); } catch (final OperationTimedoutException e) { throw new ResourceUnavailableException("Starting router " + router + " failed! " + e.toString(), DataCenter.class, router.getDataCenterId()); } if (router.isStopPending()) { s_logger.info("Clear the stop pending flag of router " + router.getHostName() + " after start router successfully!"); router.setStopPending(false); router = _routerDao.persist(router); } // We don't want the failure of VPN Connection affect the status of // router, so we try to make connection // only after router start successfully final Long vpcId = router.getVpcId(); if (vpcId != null) { _s2sVpnMgr.reconnectDisconnectedVpnByVpc(vpcId); } return _routerDao.findById(router.getId()); }
if (!_vpnMgr.deleteCustomerGatewayByAccount(accountId)) { s_logger.warn("Fail to delete site-to-site VPN customer gateways for account " + accountId);
@DB protected void updateSite2SiteVpnConnectionState(final List<DomainRouterVO> routers) { for (final DomainRouterVO router : routers) { final List<Site2SiteVpnConnectionVO> conns = _s2sVpnMgr.getConnectionsForRouter(router); if (conns == null || conns.isEmpty()) { continue;