Skip to content

nixos/wireguard: add peer service to interface dependencies #62828

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

Merged
merged 1 commit into from
Jun 9, 2019

Conversation

WilliButz
Copy link
Member

@WilliButz WilliButz commented Jun 7, 2019

Motivation for this change

Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

The issue should be easily reproducible:

[root@nixos]# wg show wg0
interface: wg0
  public key: <pubkey>
  private key: (hidden)
  listening port: 12345

peer: <peer-pubkey>
  endpoint: <endpoint>
  allowed ips: <allowed-ips>
  latest handshake: 1 second ago
  transfer: 2.25 KiB received, 708 B sent

[root@nixos]# systemctl stop wireguard-wg0.service

[root@nixos]# systemctl start wireguard-wg0.service

[root@nixos]# wg show wg0
interface: wg0
  public key: <pubkey>
  private key: (hidden)
  listening port: 12345
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

/cc @grahamc @fpletz

Sorry, something went wrong.

Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
@fpletz fpletz requested a review from grahamc June 7, 2019 14:41
@fpletz fpletz added the 0.kind: regression Something that worked before working no longer label Jun 7, 2019
@WilliButz
Copy link
Member Author

@GrahamcOfBorg test wireguard

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jun 7, 2019
@aristidb aristidb merged commit f491e94 into NixOS:master Jun 9, 2019
@WilliButz WilliButz deleted the wireguard-fix-peer-service branch June 9, 2019 11:48
ryantrinkle pushed a commit to ryantrinkle/nixpkgs that referenced this pull request Aug 19, 2019

Unverified

The email in this signature doesn’t match the committer email.
)

Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
ryantrinkle pushed a commit that referenced this pull request Sep 18, 2019

Verified

This commit was signed with the committer’s verified signature. The key has expired.
BYK Burak Yigit Kaya
Previously each oneshot peer service only ran once and was not
restarted together with the interface unit. Because of this,
defined peers were missing after restarting their corresponding
interface unit.

Co-Authored-By: Franz Pletz <fpletz@fnordicwalking.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: regression Something that worked before working no longer 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants