ovn: fix more missing ovs binaries #378038
Merged
+16
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @adamcstephens,
Here are some additional changes for the ovn package:
--with-dbdir=/var/lib/openvswitch
to configure OVS, as it is the traditional location for OVS DB. In the Open vSwitch module, it is set as/var/db/openvswitch
. I guess that we can do the same for consistency, if you think it is better.$out/bin
to match the file tree of the Open vSwitch package. This also helps with running theovn-ctl
andovs-ctl
scripts.ovs-ctl
.system-id.conf
file between reboots and package upgrades, so I set the sysconfig directory tovar/lib
because it seems to me that nixpkgs should not create files in/etc
.These changes allowed me to successfully set up Incus with a standalone OVN network. I was able to create an OVN network, attach a container to it, and ping the internet. To do so, I used this Nix module that I wrote: nixos-ovn-module. This module creates OVS services, as I unfortunately was not able to fix the OVS build in the OVN package to use the NixOS Open vSwitch module.
For reference the issue is the lack of git submodule awareness in nix-build, which does not seem to provide a way to set the variables we need to pass to the OVS autoconf. This results in multiple path issues in the OVS binaries that prevent me from using the Open vSwitch module with the OVN package
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.