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/ceph: Add a service module that enables the configuration of ceph through nixos #35299
Conversation
…ph through nixos All 5 daemon types can be enabled and configured through the module and the module both creates tho ceph.conf required but also creates and enables specific services for each daemon, based on the systemd service files that upstream provides.
…nality of both daemons and cluster
@Mic92 I've now added a testcase, as requested |
Please add the test to https://github.com/NixOS/nixpkgs/blob/master/nixos/release.nix#L219 |
nixos/tests/ceph.nix
Outdated
@@ -0,0 +1,147 @@ | |||
{ system ? builtins.currentSystem }: | |||
|
|||
with import ../lib/testing.nix { inherit system; }; |
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.
Can you add yourself to maintainers? https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/mesos.nix#L3
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.
I've added myself to the maintainers list, at L145, I should probably restructure the test after that mesos test, I just did it this way because I used networking.nix as a template.
[ "0" "1" ]; | ||
''; | ||
description = '' | ||
A list of rados gateway daemons that should have a service created. |
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.
A very minor nit is that "should have a service created" sounds imperative. Instead, these are describing not what should happen but what services will exist, right?
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.
I actually had a hard time wording that and just decided to write something at the time and continue with the rest of the module, honestly.
I'm open to suggestions of better wording, the wording isn't just imperative, it sounds wonky.
@GrahamcOfBorg test ceph |
Failure on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Now ceph should be built already. |
import ./make-test.nix ({pkgs, ...}: rec { | ||
name = "All-in-one-basic-ceph-cluster"; | ||
meta = with pkgs.stdenv.lib.maintainers; { | ||
maintainers = [ lejonet ]; |
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.
typo in the name?
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.
Whatcha mean?
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.
That handle (lejonet
) does not exists in lib/maintainers.nix
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.
Fixed: 29e78ce
LimitNOFILE = 1048576; | ||
LimitNPROC = 1048576; | ||
Environment = "CLUSTER=${clusterName}"; | ||
ExecReload = "/bin/kill -HUP $MAINPID"; |
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.
should be ${coreutils}/bin/kill -HUP $MAINPID
Did we ever verify that the test passed? |
@grahamc I only executed them locally. |
@grahamc the build bot would have had a timeout because ceph was not yet build. I tested it on a slightly older head (older in hours). |
All 5 daemon types can be enabled and configured through the module and the module both creates tho ceph.conf required but also creates and enables specific services for each daemon, based on the systemd service files that upstream provides.
Motivation for this change
In addition to the ceph package being broken, there isn't any module to configure a ceph cluster through nixos, which I'm aiming to fix.
I've successfully setup and am running a ceph cluster, on nixos, configured soley through this module.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)