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

nixos/iwd: pull in upstream .link unit file #105775

Merged
merged 2 commits into from Jan 10, 2021
Merged

Conversation

xaverdh
Copy link
Contributor

@xaverdh xaverdh commented Dec 3, 2020

Motivation for this change

This is meant to fix the race condition between iwd and udev trying to
rename the interface.

Once systemd.packages learns to deal with .link unit files it probably won't be needed anymore.

Things done

Currently testing this on my system.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@xaverdh
Copy link
Contributor Author

xaverdh commented Dec 9, 2020

cc @Mic92 @dtzWill (as maintainers)

@flokli
Copy link
Contributor

flokli commented Jan 9, 2021

Sorry for the terrible delay of this.

instead of referring to the file, we should probably "set the same contents by hand" via systemd.network.links, for visibility and overridability (and to match how we do this by zerotier). I doubt it'll change upstream that often.

See #82310 / #82941 for some background.

Can something like this be added to the 21.03 release notes file?

The iwd module now installs the upstream-provided 80-iwd.link file, which sets the NamePolicy= for all wlan devices to "keep kernel", to avoid race conditions between iwd and networkd. If you don't want this, set systemd.network.links."80-iwd" = lib.mkForce {}.

…k unit file

It is meant to fix the race condition between iwd and udev trying to
rename the interface.
@xaverdh
Copy link
Contributor Author

xaverdh commented Jan 9, 2021

Sorry for the terrible delay of this.

no problem!

instead of referring to the file, we should probably "set the same contents by hand" via systemd.network.links, for visibility and overridability (and to match how we do this by zerotier). I doubt it'll change upstream that often.

See #82310 / #82941 for some background.

Can something like this be added to the 21.03 release notes file?

The iwd module now installs the upstream-provided 80-iwd.link file, which sets the NamePolicy= for all wlan devices to "keep kernel", to avoid race conditions between iwd and networkd. If you don't want this, set systemd.network.links."80-iwd" = lib.mkForce {}.

done.

@Mic92
Copy link
Member

Mic92 commented Jan 10, 2021

Thanks!

@xaverdh xaverdh deleted the iwd-link-unit branch January 10, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants