PEERINGTestbed / client

PEERING client controller
https://peering.ee.columbia.edu
8 stars 17 forks source link

Print error when VPN fails to start #3

Closed bschlinker closed 6 years ago

bschlinker commented 8 years ago

Check return code from OpenVPN to determine if VPN started successfully. If it doesn't, print error message along with path of logfile to check.

cunha commented 8 years ago

OpenVPN forks into a daemon and exits with success for all run-time errors. We need to upgrade to the premium management interface experience.

bschlinker commented 6 years ago

Seems like we could pass an envvar to openvpn of a tmpfile. openvpn will pass the envvar onwards to scripts/openvpn/up.sh. up.sh will write something into the file indicating we're up. Then the up command returns, saying successful. It can check every 100 ms on whether the PID is dead or the file has been written to. If it takes too long, it dies, killing the PID too.

Management interface would be more premium, difficult for me to say how much more difficult though.

bschlinker commented 6 years ago

Might want to investigate the status-file option too:

--status file [n]
Write operational status to file every n seconds.
bschlinker commented 6 years ago

I guess each client instance would have its own independent management socket? I guess that would work too. Useful for querying status for the status interface as well.

cunha commented 6 years ago

We don't wait for OpenVPN, but the status command now uses a management socket and is significantly more robust.

cunha commented 6 years ago

Closing in favor of https://github.com/PEERINGTestbed/client/issues/6