-
Notifications
You must be signed in to change notification settings - Fork 298
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
Add Nix expressions to build Snabb #876
Conversation
This will be used by the lwAFTR.
Currently shm.map() will create the file and any containing directories if it does not exist. This is not so great, so I split it into separate open() and create() functions, adapt all callers, and remove map() from the public interface of the shm module.
This commit adds a histogram facility that can record the distribution of different sampled magnitudes. In particular, it is useful for recording distributions of times. Histograms can be mapped into /var/run/snabb, where they can be analyzed by a separate process. This commit also wires up the app.breathe() loop to record latencies for its breath cycles into a well-known file (/var/run/snabb/PID/engine/latency), and wires up "snabb top" to do some basic statistics on this data.
The idea is, there are lots of different kinds of analyses you might want to do on a histogram, and it's too early to canonicalize one of them. Better to build your own on top of iterate(). Also adds tests for iterate().
Imported from Igalia/lwaftr_starfruit, up to date with commit a87632f
@lukego is there anything it'd be helpful for me to do with kbara-next, like merge master into it? I'm still getting used to the upstream Snabb workflow... :-) |
Hey, cool, there is actually no mess here and everybody is doing the right thing :) we are exercising a new edge in our collaboration graph here :-). The reason we see many commits here is that downstream branch The next steps could be either of these things:
So @kbara it is really up to you which you prefer. In a perfect world we might all merge |
Here is one git incantation to summarize the changes more succinctly:
Too bad there is no button on the Github UI to see |
Excellent. I've run git merge upstream/master on kbara-next and pushed that; I agree that doing that after each release sounds like a good workflow. |
Interesting. I've done that, it looks to me like it's updated, but the list of commits/etc above doesn't update. |
Interesting, yep. I see that you have pushed:
but I suppose that the Github UI does not automagically refresh in this case. Oh well, probably not a big deal. |
Yeah; I couldn't find a way to manually do that either. All the more reason to do this right after releases, eh? |
There is a trailing whitespace after |
will clearly only work on some machines. Is the intent for this to just be running on the snabblab servers? If not, how are people with other PCI IDs expected to use it - local modifications to this file? |
Aside from those two nits, it looks good to me, with the caveat that I haven't dug deeply into nix yet. :-) |
You're right. I'll make sure the `SNABB_PCI* exports can be superseeded via bash env. And that whitespace should be gone. |
Pushed the two fixes, but the diff is bigger now:
|
I've removed WIP, the two issues I mentioned can be addressed later. |
Each migration is now only responsible for progressing to the next version which then will run the subsequent migration to progress further. This is done as a long chain until the configuration has been migrated to the latest configuration schema. This also fixes an issue with the 3.2.0 -> 2017.07.01 migration which no longer functioned correctly.
Fix snabbco#876 - Improve config migration by chaining together
Hydra is currently using these in release.nix and they build successfully at https://hydra.snabb.co/jobset/snabb/master
It's a good idea to put the upstream, because different Snabb versions may need different the Nix expressions. It's also handy to clone Snabb and just run
nix-build release.nix
and you should get the snabb, manual and tests (with logs) for that particular commit (if tests didn't fail).There are two blockers:
git
for manual and also Snabb at build time. This is problematic since hash in Nix is content addressed (src = ./.;
and.git
mutates on each commit and thus changes regardless of the commit checkout. See my upstream comment atfetchgit
withleaveDotGit = true
is still not completely deterministic NixOS/nixpkgs#8567 (comment)PS: There are lots of commits, maybe kbara-next needs to be rebase on master? Or should I just rebase on kbara-next?