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/frr: adapt to frr-9 #274425

Merged
merged 1 commit into from
May 30, 2024
Merged

nixos/frr: adapt to frr-9 #274425

merged 1 commit into from
May 30, 2024

Conversation

woffs
Copy link
Contributor

@woffs woffs commented Dec 15, 2023

Description of changes

In frr-9 staticd no longer accepts -f configfile option, but uses mgmtd for configuration management. Therefore we remove -f configfile from all frr services and use the default config location /etc/frr/${service}d.conf (NixOS used this without d before) and enable mgmtd automatically, if staticd is enabled. We have to follow upstream release notes carefully if they add more daemons to the new mgmtd method (or we start mgmtd, like zebra, if any service is enabled?).

I had no leasure to read and understand mgmtd documentation thoroughly yet, sorry. I'm not sure how to handle mgmtd reload, I tried to disable reloading mgmtd for now, because frr-reload denies reloading mgmtd.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@woffs
Copy link
Contributor Author

woffs commented Dec 15, 2023

@GrahamcOfBorg test frr

@woffs
Copy link
Contributor Author

woffs commented Dec 17, 2023

@GrahamcOfBorg test frr

@woffs woffs marked this pull request as ready for review December 17, 2023 16:16
@woffs woffs force-pushed the fix-274286 branch 2 times, most recently from 1c0071d to 93c95ed Compare December 17, 2023 17:04
@woffs
Copy link
Contributor Author

woffs commented Dec 17, 2023

@GrahamcOfBorg test frr

@woffs woffs mentioned this pull request Apr 15, 2024
13 tasks
@thillux thillux self-requested a review April 15, 2024 15:41
Copy link
Contributor

@thillux thillux left a comment

Choose a reason for hiding this comment

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

LGTM

As NixOS currently generates frr daemon configs into store paths, which are read-only, we can keep separate daemon configs also for frr 10.0. A unified frr.conf would currently only be necessary, if writing to this file should also be supported via e.g. vtysh.

@thillux thillux requested a review from mweinelt April 16, 2024 13:05
@mweinelt
Copy link
Member

Probably needs to be rebased. lib.mdDoc was removed treewide a few days ago.

@woffs
Copy link
Contributor Author

woffs commented Apr 16, 2024

Probably needs to be rebased. lib.mdDoc was removed treewide a few days ago.

done

@woffs
Copy link
Contributor Author

woffs commented Apr 16, 2024

@GrahamcOfBorg test frr

@thillux
Copy link
Contributor

thillux commented Apr 18, 2024

Regarding mgmtd reload: mgmtd keeps track of different config versions for other daemons. It cannot be reloaded with a different config on its own. I think its ok to block/ignore this operation. frr-reload.py also does not contain mgmtd in the list of allowed daemons to reload (https://github.com/FRRouting/frr/blob/master/tools/frr-reload.py#L1999). I guess from semantics side that's correct.

@thillux
Copy link
Contributor

thillux commented Apr 21, 2024

@woffs What's your opinion regarding mgmtd?

@woffs
Copy link
Contributor Author

woffs commented Apr 28, 2024

@woffs What's your opinion regarding mgmtd?

If it cannot be reloaded and does not need to be reloaded, we should not reload it 😉

@woffs
Copy link
Contributor Author

woffs commented May 29, 2024

I think #274286 is somehow a security issue (configured static routes getting ignored without much noise), so it would be great this PR could be finally reviewed and merged. 😁

@woffs woffs added the backport release-24.05 Backport PR automatically label May 29, 2024
- fix NixOS#274286
- remove `-f configfile` from ExecStart
- use /etc/frr/${service}d.conf
- enable mgmtd when staticd is enabled
- don't frr-reload.py mgmtd
- remove obsolete lib.mdDoc
@mweinelt mweinelt merged commit e0f4e4b into NixOS:master May 30, 2024
21 checks passed
Copy link
Contributor

Successfully created backport PR for release-23.11:

Copy link
Contributor

Successfully created backport PR for release-24.05:

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.

nixos/frr: staticd does not accept -f anymore in frr-9
3 participants