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
openvswitch: better integration with systemd #53033
Conversation
29d6867
to
9be76a1
Compare
Rebased to master. @volth have you been able to test this ? It's been running on my home setup for a year or so without any hitch on my side. |
@netixx are you able to address the above comments and continue with this PR? |
9be76a1
to
e5c79f4
Compare
Yes, sorry for the delay, the PR has been pending for a while and I was not monitoring it. I also rebased to the current master to fix the conflicts. Let me know if it still needs modifying! |
Does anyone know who we need to call in for review here? |
I don't have time to properly review and test it, since I'm not using it anymore, but changes seem ok. |
I don't know the policy about 'not so often' used configuration like this, so I let the more experienced people decide, but, if this request is merged, then it would be nice if this one was too: #53032 (since the existing |
Bumping up a level to @disassembler or @lheckemann 🤷♂️ |
Maybe @teto can have a look. |
I use neither networkd or ovs (just need it when running mininet but I don't actually test the SDN capabilities). I can see some breaking changes. Considering the few people using the module that may be fine. |
e5c79f4
to
adb6d20
Compare
Yes no problem. I just rebased and added myself as maintainer of the openvswitch nixos module. |
@@ -129,6 +129,8 @@ in { | |||
PIDFile = "/run/openvswitch/ovs-vswitchd.pid"; | |||
# Use service type 'forking' to correctly determine when vswitchd is ready. | |||
Type = "forking"; | |||
Restart = "always"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would on-failure
also work here?
Restart = "always"; | |
Restart = "on-failure"; |
@netixx Since there seems nobody else to test this, could you give me an example configuration? |
The following example creates a vswitch named The networking.vswitches = {
vswitch = {
interfaces = [
{
name="eth0";
}
{
name="test";
vlan=100;
type="internal";
}
];
};
}; I this something that could help you ? |
Any plans on getting this into unstable/master? |
adb6d20
to
27b6b15
Compare
I rebased/fix conflicts with master branch. |
Systemd dependencies for scripted mode were refactored according to analysis in NixOS#34586. networking.vswitches can now be used with systemd-networkd, although they are not supported by the daemon, a nixos receipe creates the switch and attached required interfaces (just like the scripted version). Vlans and internal interfaces are implemented following the template format i.e. each interface is described using an attributeSet (vlan and type at the moment). If vlan is present, then interface is added to the vswitch with given tag (access mode). Type internal enabled vswitch to create interfaces (see openvswitch docs). Added configuration for configuring supported openFlow version on the vswitch This commit is a split from the original PR NixOS#35127.
27b6b15
to
cd3597b
Compare
Any hope of getting this merged ? |
Tested using the following snippet:
|
The idea was to comply with the name of the component http://www.openvswitch.org//support/dist-docs/ovs-vswitchd.8.pdf and make it clear the processed belong to OVS. |
Systemd dependencies for scripted mode
were refactored according to analysis in #34586.
networking.vswitches can now be used with systemd-networkd,
although they are not supported by the daemon, a nixos receipe
creates the switch and attached required interfaces (just like
the scripted version).
Vlans and internal interfaces are implemented following the
template format i.e. each interface is
described using an attributeSet (vlan and type at the moment).
If vlan is present, then interface is added to the vswitch with
given tag (access mode). Type internal enabled vswitch to create
interfaces (see openvswitch docs).
Added configuration for configuring supported openFlow version on
the vswitch
This commit is a split from the original PR #35127.
Motivation for this change
see referenced PR
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)