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/networkd: add RoutingPolicyRules-related options #81405

Merged
merged 2 commits into from Mar 4, 2020

Conversation

picnoir
Copy link
Member

@picnoir picnoir commented Feb 29, 2020

Motivation for this change

Mapping the systemd-networkd RoutingPolicyRules in the NixOS networkd module.

Check the RoutingPolicyRule section in the systemd.network for more informations.

Things done
  • Added the relevant options in the module

  • Modified the current networkd NixOS test to test all these options.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)

  • Built on platform(s)

    • NixOS
  • 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.

cc @flokli @fpletz @andir

@picnoir
Copy link
Member Author

picnoir commented Feb 29, 2020

@GrahamcOfBorg test systemd-networkd

@picnoir
Copy link
Member Author

picnoir commented Feb 29, 2020

I'm puzzled by the ARM test error: https://logs.nix.ci/?key=nixos/nixpkgs.81405&attempt_id=adb7ba1f-8fb3-418c-af5a-68f0a2202fad

I do not have access to an interactive session on a aarch64 machine, it makes debugging this rather tricky :(

Looks like it's IPv6 related right?

@picnoir
Copy link
Member Author

picnoir commented Feb 29, 2020

@GrahamcOfBorg test systemd-networkd

@picnoir
Copy link
Member Author

picnoir commented Feb 29, 2020

Aha! Found the root cause of the ARM failure: we're missing the CONFIG_IP_MULTIPLE_TABLES kernel config flag.

@picnoir
Copy link
Member Author

picnoir commented Feb 29, 2020

@GrahamcOfBorg test systemd-networkd

@picnoir
Copy link
Member Author

picnoir commented Feb 29, 2020

The aarch test fails because of #61602. I think it's safe to ignore it for now.

@GrahamcOfBorg test systemd-networkd

@flokli flokli force-pushed the nin-networkd-policy-rules branch from 171f27d to 10d4beb Compare March 1, 2020 22:53
@flokli
Copy link
Contributor

flokli commented Mar 1, 2020

Rebased on top of the landed aarch64 fix in master.

@GrahamcOfBorg test systemd-networkd

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from that one comment, LGTM 👍 - thanks!

nixos/modules/system/boot/networkd.nix Outdated Show resolved Hide resolved
@picnoir
Copy link
Member Author

picnoir commented Mar 2, 2020

Updated. I also removed some other 64bit integer occurrences in the process.

Naive question: Nix 2.2 was released more than a year ago. Any reason to keep supporting Nix < 2.2?

@GrahamcOfBorg test systemd-networkd

@Ma27
Copy link
Member

Ma27 commented Mar 4, 2020

Naive question: Nix 2.2 was released more than a year ago. Any reason to keep supporting Nix < 2.2?

Not sure, what do others think of it?

@Ma27 Ma27 merged commit 7f9131f into NixOS:master Mar 4, 2020
@picnoir picnoir deleted the nin-networkd-policy-rules branch March 4, 2020 14:05
@andir
Copy link
Member

andir commented Mar 4, 2020 via email

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

6 participants