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
Reworked Cassandra Module #31410
Reworked Cassandra Module #31410
Conversation
Could you add back at least a simple test? |
I have tried to port the old test, but I ran into some problems that I believe should be fixed out-of-the-box.
Other things I've noticed:
|
Yeah, it's fine if there is stuff that does not work. But I'd rather we have a simplistic test than none at all... |
based on @roberth testing and review, marking as a WIP so it doesn't get accidentally merged before those points are addressed. I also think some of these commits can be squashed. I don't see a reason to do 2 version bumps in a single PR. |
Agreed with @NeQuissimus , the previous commit/test may not have been pretty, but it did reveal bugs in the packaging before that yielded unusable nixos packages. cassandra would run, but if you tried to join it to a cluster, it would segfault due to a missing compression library. scratch that about the repair. it did exist. |
Couldn't find the time to push this any further earlier. I just pushed a simplistic test which already revealed a few problems. Do I have to plug in this test anywhere else? @roberth Should @disassembler I'm willing to clean up the commit history before this get merged. Should I do this in this branch and do a forced push or open a new pull request? |
bb2b2e4
to
47e81a5
Compare
Just cleaned up the commit history. |
8fb808f
to
0c9c895
Compare
9e7e76f
to
394ead3
Compare
Hey all, I just added a two-node setup for tests. In the process of this I added the options The tests run successfully here. Is there any further missing bit I oversee which would block this module from being merged? |
Did you try restoring the node failure tests? They look quite simple. |
e431061
to
3a99935
Compare
@roberth I succesfully ported the However, the EDIT: My bad, I didn't see the extra replacement parameters passed to the node. |
3a99935
to
6e04788
Compare
Just fixed the last test. All of them are passing! |
Is there anything else blocking this from being merged? |
You can split out the version updates like disassembler requested. Otherwise, looks good to me. |
@roberth What do you mean? Should I drop |
Well, you asked what else could be done ;). Separate PRs may help to get some of the work merged more quickly. It also fits the contributing guidelines a bit better, although that is up for interpretation. |
So I tried to separate concerns and bump the versions of all cassandra packages currently in nixpkgs in a separate branch. As I didn't want to go through testing them manually I reconfigured the tests of this pull request. They all fail except for 3.1! So how should we deal with this? Drop all packages except 3.1? Note that 2.1, 2.2 and 3.0 are still receiving bug fixes upstream. Should the module be changed so it can only be used with Cassandra 3.1? I don't have the time and energy to make the service-module cross-version compatible! |
@fuzzy-id The lines from your example
seem to be required, whereas for other services these ids are added automatically. |
7ace876
to
f377abc
Compare
f377abc
to
f001e1a
Compare
@roberth I added a small section to the release notes. Previously the uid and gid were set in the service itself. Should I put it back in there? Does this also work around the possibility of overlapping ids? EDIT: Just to clarify this: I added a cassandra user and group to |
@fuzzy-id I'm sorry, my last comment about the ids was incorrect. I jumped to a conclusion too quickly. Your solution seems to be an improvement. I believe NixOS has a 'reserved' range of uids for this purpose, where you can consider the uid assigned when it gets merged. Haven't seen official docs about that though. LGTM |
@NeQuissimus do you think this is ready for merging? |
removed release note and resolved conflict with master branch. |
@fuzzy-id This does need to be in the release notes. Would you mind moving it to the 18.09 release notes? |
I would really like to see this working again |
@BFrog This is working! We don't use it in production atm, as we are in alpha phase. Hence, I haven't played around and cleaned up cluster-setups. But for simple single-machine setups it works like a charm. (NixOS-tests for multi-cluster setups are there, so it should be working.) |
Hey guys, is anyone willing to merge this, so that it will be part of 18.09? I could invest some more cleanup work if there is the need to. (i.e. adding the release note and resolve the conflicts). But it would be nice to get some affirmation that the work is not going to be lost because no one really has the time to merge this. I just wanted to do version bumps for Cassandra and all this rebasing and cherry-picking just to be able to run the tests is a big pain in the as. So I guess we would rather maintain our own versions of this module internally. |
If you rebase it, we should be able to merge it. |
Adds a replacement for the previously broken `services.database.cassandra` with tests for a multi-node setup.
Rebased and added release note. Let me know if there is something missing. I also re-ran the tests for all Cassandra versions. |
Motivation for this change
This is a rewrite of the cassandra module as described in #31349.
Things done
Cassandra succesfully starts in a container with the following expression:
The module surely needs some further refinements. But it's a start. :)