Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Start OpenVPN client when starting scionlab.target #211

Closed
wants to merge 5 commits into from

Conversation

mkowalski
Copy link
Contributor

@mkowalski mkowalski commented Nov 13, 2019

This change adds dependency on the scionlab.target to the [email protected] causing the latter to be started when the former is starting. This means it is no longer required to manually start the client VPN session.

This also adds dependency on the TUN device to the scion-border-router services causing

  • border router wait till VPN is up and running
  • border router stop if VPN goes down

Please note currently border router will not come back automatically after VPN is back again.

Closes: #190
Closes: #206


This change is Reviewable

@mkowalski
Copy link
Contributor Author

The missing part is to confirm whether creating a file in /etc/systemd/system/[email protected]/ succeeds without any problem (in case the directory does not exists or something like this).

@mkowalski mkowalski force-pushed the issue/190 branch 2 times, most recently from 17ef749 to 9fd748c Compare November 14, 2019 13:24
@mkowalski
Copy link
Contributor Author

mkowalski commented Nov 14, 2019

The behaviour is not super-obvious, as there are multiple scenarios of TUN device failing

  1. VPN goes down but TUN device exists
  2. VPN goes down and TUN device disappears

The current behaviour of the border router is not very obvious (or logically explainable) with respect to it's autorecovery capabilities - in all the cases it keeps running, but in some of them even after VPN is back, SCION is not coming back till border router is restarted.

Having UDEV rules installed means there is an automatic recovery in case the VPN interface comes back again. The behaviour is as follows

  • border router is running only if TUN device is working properly
  • TUN device going down means border router goes down
  • TUN device reappearing means border router starts again

@matzf
Copy link
Contributor

matzf commented Nov 18, 2019

I'm a bit scared of the complexity that is added here... Maybe we could use a simpler solution; either allow the router to bind to 0.0.0.0 and completely eliminate this problem (scionproto/scion#3395) or fix the router to shut down or retry properly on on fatal errors

@mkowalski
Copy link
Contributor Author

I completely agree with above. This code in here is just a workaround for the issue because (1) I do not believe at the moment it will be fixed upstream any time soon and (2) the current behaviour is severely flawed

@matzf matzf added the stale label Oct 6, 2020
@matzf
Copy link
Contributor

matzf commented Oct 6, 2020

Note: the BR behaviour has been improved (a long time ago) to die properly in the case an interface goes down. This makes this issue a lot less severe.

@matzf matzf closed this Oct 6, 2020
@matzf matzf deleted the issue/190 branch September 15, 2021 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants