Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1761#discussion_r87900141
  
    --- Diff: 
server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java ---
    @@ -962,18 +962,22 @@ protected void 
updateSite2SiteVpnConnectionState(final List<DomainRouterVO> rout
                             }
                             final Site2SiteVpnConnection.State oldState = 
conn.getState();
                             final Site2SiteCustomerGateway gw = 
_s2sCustomerGatewayDao.findById(conn.getCustomerGatewayId());
    -                        if (answer.isConnected(gw.getGatewayIp())) {
    -                            
conn.setState(Site2SiteVpnConnection.State.Connected);
    -                        } else {
    -                            
conn.setState(Site2SiteVpnConnection.State.Disconnected);
    -                        }
    -                        _s2sVpnConnectionDao.persist(conn);
    -                        if (oldState != conn.getState()) {
    -                            final String title = "Site-to-site Vpn 
Connection to " + gw.getName() + " just switch from " + oldState + " to " + 
conn.getState();
    -                            final String context = "Site-to-site Vpn 
Connection to " + gw.getName() + " on router " + router.getHostName() + "(id: " 
+ router.getId() + ") "
    -                                    + " just switch from " + oldState + " 
to " + conn.getState();
    -                            s_logger.info(context);
    -                            
_alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, 
router.getDataCenterId(), router.getPodIdToDeployIn(), title, context);
    +
    +                        if (answer.isIPPresent(gw.getGatewayIp())) {
    +                            if (answer.isConnected(gw.getGatewayIp())) {
    +                                
conn.setState(Site2SiteVpnConnection.State.Connected);
    +                            } else {
    +                                
conn.setState(Site2SiteVpnConnection.State.Disconnected);
    +                            }
    +                            _s2sVpnConnectionDao.persist(conn);
    +                            if (oldState != conn.getState()) {
    +                                final String title = "Site-to-site Vpn 
Connection to " + gw.getName() + " just switch from " + oldState + " to " + 
conn.getState();
    --- End diff --
    
    Minor nit: could you please fix the grammatical error in this error 
message?  It should read "~~just~~ switch**ed** from".


---
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.
---

Reply via email to