Skip to content

Conversation

@eliasgomes
Copy link
Contributor

@eliasgomes eliasgomes commented Mar 17, 2017

The StrongSwan VPN config would be rewritten too often. We removed ipsec.conf editing, as this file can be changed directly on the systemvm.iso which is more efficient.

Next to that the StrongSwan code would kick in on any command that would also require iptables config. That isn't a problem on its own, but it was executing a stop/start of the connection all the time. This results in downtime of the VPN connection, but more important it leads to a blocking thread (for 30s max). That resulted sometimes in a timeout when processing a non-VPN json file (as we've seen with the cleanup failures) because this timeout was also 30s.

First I changed it to a non-blocking start, but then realised since we have auto=start we simply have to reload the config and ipsec will take care of the rest on its own. Fast & easy!

BTW, it's now clear why we only saw it on the routers with Strongswan. Furthermore, the reason we only saw it on one of the two routers is due to the passive flag. It would only execute the restart when passive=false.

Thanks @eliasgomes for your help debugging this :-)

@remibergsma remibergsma changed the title Not touching the ipsec.conf file on every run Fix StrongSwan test failures due to blocking connection thread Mar 17, 2017
@neubauerf neubauerf merged commit 34d9fc6 into master Mar 18, 2017
@neubauerf neubauerf deleted the fix/ipsec-restart branch March 18, 2017 14:40

# Strongswan is included in the systemvm template 17.3.12 and newer
# Strongswan is included in the systemvm template 17.3.13 and newer
if get_systemvm_version() > 170312:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remibergsma Why was only the comment adjusted?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@borisroman because the code >17.3.12 and the comment were not in sync. Version 17.3.12 still has OpenSwan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants