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 - unnecessary patch #24817

Closed
sjau opened this issue Apr 11, 2017 · 2 comments
Closed

OpenVPN - unnecessary patch #24817

sjau opened this issue Apr 11, 2017 · 2 comments

Comments

@sjau
Copy link

sjau commented Apr 11, 2017

Issue description

Been using OpenVPN for ages and also a regular in #openvpn on freenode. With current implementation on NixOS I have the issue that when I mount a CIFS share over the VPN, systemd will - when powering off - first cut the OpenVPN connection and then try to umount it. Because the connection is already severed, it will have a 180 (+) second timeout during which it waits for a reply from the mounted share.

Anway, I asked in #openvpn about it and one of the OPs (dazo, Fedora maintainer) told this:

dazo I[...] this patch: https://github.com/NixOS/nixpkgs/blob/277e7119be926b4fcdf4e73654490caaf350b3e1/pkgs/tools/networking/openvpn/systemd-notify.patch ... is completely unnecessary with openvpn v2.4.0 (and even more so in v2.4.1 which have even more systemd improvements)
17:44:17 dazo in fact, it may actually make things a bit worse, as it makes OpenVPN tell systemd "I'm okay" ... and then a few lines down, it's an error check - where v2.4 actually tells systemd FAILURE!

So it seems that patch should be removed for 2.4 while it was good for 2.3.

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)

17.09pre105258.01a8de97eb (Hummingbird)

  • Nix version: (run nix-env --version)

nix-env (Nix) 1.11.8

  • Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

"17.09pre105258.01a8de97eb"

Mic92 added a commit that referenced this issue Apr 11, 2017
This patch was only necessary for 2.3.x, while 2.4.0 improved
its own systemd notify support.

See: #24817
@Mic92
Copy link
Member

Mic92 commented Apr 11, 2017

I removed the patch as openvpn indeed does systemd-notify on its own.
But I do not see how this is related to your problem. Openvpn would be still stopped before the mountpoint is unmounted by openvpn. The mount would need an After= dependency, so it is stopped before the openvpn service: https://www.freedesktop.org/software/systemd/man/systemd.mount.html

@sjau
Copy link
Author

sjau commented Apr 11, 2017

It's not related to my problem. it's just something that came up when I discussed the issue in #openvpn. I guess this issue can then be closed.

@Mic92 Mic92 closed this as completed Apr 11, 2017
Mic92 added a commit that referenced this issue Apr 11, 2017
This patch was only necessary for 2.3.x, while 2.4.0 improved
its own systemd notify support.

See: #24817
(cherry picked from commit e09b950)
adrianpk added a commit to adrianpk/nixpkgs that referenced this issue May 31, 2024
This patch was only necessary for 2.3.x, while 2.4.0 improved
its own systemd notify support.

See: NixOS#24817
(cherry picked from commit e09b950)
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

No branches or pull requests

2 participants