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: use the niconfig partition to coordinate vpnctl conf files #424

Merged
merged 5 commits into from
Jul 12, 2022

Conversation

amstewart
Copy link
Contributor

@amstewart amstewart commented Jul 8, 2022

NI maintains a vendor-specific initscript (/etc/init.d/vpn) and a vendor-specific wrapper script (/usr/sbin/vpnctl) around openvpn. Those scripts are supposed to replace the upstream initscript for openvpn and will direct the openvpn service to use configuration files in /etc/natinst/share (the niconfig shared-partition between safemode and runmode).

When we forked the distro to create the nilrt-nxg variant - we originally did not intend to continue using the safemode/runmode boot scheme, and so modified the version of the wrapper script for that variant to use the normal /etc/openvpn config location instead. When the forks converged into the OneRT image, the nilrt-nxg variant won the merge, even though OneRT uses safemode/runmode.

So users now get this confusing wrapper script that doesn't source from the correct location.

This patchset corrects that mistake, by reseting the openvpn configuration path to /etc/natinst/share. It also performs some trivial cleanup of the openvpn .bbappend.

NI AZDO: 1166546

Testing

  • Built this recipe on my dev machine and installed it to a hardknott VM. Confirmed that everything looks OK and that the openvpn upstream loopback-client/-server tests work.
  • I didn't verify the vpn initscript itself, because I don't have an easy way to do that. And openvpn support in NILRT is generally in need of a stronger definition of supported workflows anyway - so it is ambiguous as to what needs to work.

amstewart added 5 commits July 7, 2022 06:52
This reverts commit b37024d.

The meta-nilrt vpn recipe was previously only intended to support
`nilrt-nxg`. It now supports only `nilrt`, where safemode exists.

Return the script commentary about safemode, since it is again relevant.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
This reverts commit 9f0afc6.

The meta-nilrt vpn recipe was previously only intended to support
`nilrt-nxg`. It now supports only `nilrt`, where safemode, and the
configfs, exists.

Revert to using the niconfig partition to coordinate openvpn
configuration between safemode and runmode.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
... for clarity.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
The DEPENDS and RDEPENDS added by this openvpn.bbappend were relevant in
historic versions of the recipe, but are no-longer used.

Remove them.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
Use the new variable override syntax.

Signed-off-by: Alex Stewart <alex.stewart@ni.com>
@amstewart amstewart requested review from shruthi-ravi and a team July 8, 2022 19:08
@amstewart amstewart merged commit f07d43e into ni:nilrt/master/hardknott Jul 12, 2022
@amstewart amstewart deleted the dev/hardknott/openvpn branch July 12, 2022 20:52
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.

2 participants