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

openvpn@client / openvpn@server not part of scionlab.target #190

Open
mkowalski opened this issue Oct 4, 2019 · 3 comments
Open

openvpn@client / openvpn@server not part of scionlab.target #190

mkowalski opened this issue Oct 4, 2019 · 3 comments

Comments

@mkowalski
Copy link
Contributor

mkowalski commented Oct 4, 2019

Currently when doing systemctl list-dependencies scionlab.target neither [email protected] not [email protected] are visible (respectively on the client and AP).

The main issue in here is the fact that membership in a target is defined in the source service, not in the target itself. Therefore what requires a modification is /lib/systemd/system/[email protected] which is shipped by openvpn package.

This is strictly forbidden for us to modify this file directly, but we can use systemd killer feature of drop-ins, i.e. create /etc/systemd/system/[email protected]/override.conf(or ... @server.service.d ... for the AP) with the content as follows

[Install]
WantedBy=scionlab.target

Not to be so easy, there is a caveat with this - as we are using super old Ubuntu 16.04 with super old systemd there, we cannot override [Install] section in the drop-in file. The following commit in systemd enables overriding this section -- systemd/systemd@caa45f5, however Ubuntu 16.04 does not seem to backport this.

TLDR; Ubuntu 16.04 + systemd 229 do not allow solving this issue in an elegant way

Linked-issue: https://gitlab.inf.ethz.ch/OU-PERRIG/scionlab/scion-builder/issues/13

@mkowalski
Copy link
Contributor Author

I have tested and Ubuntu 18.04 + systemd 237 allow to properly override [Install] section

@mkowalski
Copy link
Contributor Author

This task is unblocked now, we are running with systemd which supports overriding [Install] directive.

@mkowalski
Copy link
Contributor Author

mkowalski commented Oct 31, 2019

BindsTo=sys-devices-virtual-net-lan0.device
After=sys-devices-virtual-net-lan0.device

This adds dependency on the network interface lan0. Please note it should be added in the scionlab.target thus the change should be done in the scion-builder repository

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 a pull request may close this issue.

1 participant