Fix StrongSwan test failures due to blocking connection thread #339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The StrongSwan VPN config would be rewritten too often. We removed
ipsec.confediting, as this file can be changed directly on thesystemvm.isowhich 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
sometimesin 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=startwe simply have toreloadthe 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
passiveflag. It would only execute the restart whenpassive=false.Thanks @eliasgomes for your help debugging this :-)