cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-10010) Some S2S VPN configurations fail to establish a connection
Date Sat, 02 Dec 2017 15:27:00 GMT


ASF GitHub Bot commented on CLOUDSTACK-10010:

rhtyd commented on a change in pull request #2190: CLOUDSTACK-10010: Fixed the negotiation
of S2S VPN connections

 File path: systemvm/patches/debian/config/opt/cloud/bin/
 @@ -582,10 +582,21 @@ def configure_ipsec(self, obj):
   "Configured vpn %s %s", leftpeer, rightpeer)
             CsHelper.execute("ipsec rereadsecrets")
-        # This will load the new config and start the connection when needed since auto=start
in the config
+        # This will load the new config
         CsHelper.execute("ipsec reload")
         os.chmod(vpnsecretsfile, 0400)
+        # Check that the ipsec config is ready
+        for i in range(2):
+            result = CsHelper.execute('ipsec status vpn-%s | grep "%s"' % (rightpeer, peerlist.split(",",
+            if len(result) > 0:
+                break
+            time.sleep(1)
+        # With 'auto=route', connections are established with an attempt to communicate over
the S2S VPN
+        # Attempt to ping the other side to initialize the connection of the S2S VPN configuration
+        CsHelper.execute("timeout 0.5 ping -c 1 %s" % (peerlist.split("/", 1)[0]))
 Review comment:
   Here the timeout maybe too small and the ping `IP` may be something like (for
a peer cidr of instead of say It's better to ping right peer or ping
the peerlist cidr replacing `.0` with `.1`?

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Some S2S VPN configurations fail to establish a connection
> ----------------------------------------------------------
>                 Key: CLOUDSTACK-10010
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Virtual Router
>    Affects Versions:
>            Reporter: Will Stevens
> I am not sure if a regression was introduced with this PR #2062, but we have found issues
with this configuration now that we have it in production.
> The core of this change is to change the S2S VPN config from {{auto=start}} to {{auto=route}}.
Read more about this setting here:
> We found there to be issues when using {{auto=start}} for both sides of the connection
as there was problem negotiating the connection. Instead the {{auto=route}} config will only
establish a connection once there is an attempt to send traffic over the connection. In order
to attempt to open the connection as soon as the VPN connection is configured, a ping to the
other side of the connection has been added to establish the connection.

This message was sent by Atlassian JIRA

View raw message