[ https://issues.apache.org/jira/browse/CLOUDSTACK-9592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15665165#comment-15665165 ]
ASF GitHub Bot commented on CLOUDSTACK-9592: -------------------------------------------- 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". > Empty responses from site to site connection status are not handled propertly > ----------------------------------------------------------------------------- > > Key: CLOUDSTACK-9592 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9592 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Network Controller > Affects Versions: 4.8.0 > Environment: Any Hypervisor > Reporter: subhash yedugundla > Fix For: 4.8.1 > > > vpn connection status gives responses like the below sometimes > Processing: { Ans: , MgmtId: 7203499016310, via: 1(10.147.28.37), Ver: v1, > Flags: 110, > [{"com.cloud.agent.api.CheckS2SVpnConnectionsAnswer":{"ipToConnected":{},"ipToDetail":{},"details":"","result":true,"wait":0}}] > } > 2016-09-27 08:52:19,211 DEBUG [c.c.a.t.Request] > (RouterStatusMonitor-1:ctx-c20f391d) (logid:c217239d) Seq > 1-2315413158421863581: Received: { Ans: , MgmtId: 7203499016310, via: > 1(10.147.28.37), Ver: v1, Flags: 110, > { CheckS2SVpnConnectionsAnswer } > In the above scenario, the bug in the processing of this response assumes the > connection is disconnected even though it is not disconnected and there would > be two consecutive alerts in logs as well as emails even though there is not > actual disconnection and reconnection > Site-to-site Vpn Connection XYZ-VPN on router r-197-VM(id: 197) just switch > from Disconnected to Connected > Site-to-site Vpn Connection to D1 site to site VPN on router r-372-VM(id: > 372) just switch from Connected to Disconnected -- This message was sent by Atlassian JIRA (v6.3.4#6332)