-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Fix Cassandra, improve config and tests #59179
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
Conversation
This PR now also fixes the tests for Cassandra. |
e2ed494
to
5041afc
Compare
This is very necessary. Thanks Daniel. |
I broke some of the binaries in #59090... |
Please somebody have a look - Cassandra is currently broken on master. |
Hi @JohnAZoidberg, One delay here is that there is no clear indication of who the cassandra expert is for NixOS. Looking at the git history for both the package and service is a bit sparse. If no one is an expert on cassandra it will take a fair bit of work to review and validate these changes. So the question is... who do we need to get involved for review of this PR before someone with the appropriate access will feel comfortable merging? |
@GrahamcOfBorg build cassandra |
@JohnAZoidberg cassandra is missing from all-tests.nix. |
Actually yeah, that makes me think I should add my new config options to the tests so that non-Cassandra people can trust that they do the right thing. (And also they're automatically checked.) |
Does anybody know whether I can rely on the IPs staying like they are? Or can I force them to be like I assume? |
Looking through |
I added some more tests that test almost all config options. |
a7dd426
to
d71bfa7
Compare
@fuzzy-id You rewrote the module - do you have any thoughts? |
Looks like openjdk on arch is broken in master
Unrelated to this change, so I'm going to ignore those aarch64-linux errors. |
On first sight this looks good and promising. @JohnAZoidberg did you run the tests with all versions of cassandra we currently have in nixpkgs? |
Allow for more intuitive specifying of seed node addresses with Nix syntax.
Seems like you can't have a node as its own seed when it's listening on an interface instead of an IP. At least the way it was done in the test doesn't work and I can't figure out any other way than to just listen on the IP address instead.
Would previously overwrite the binary with the wrapper and thus wrap itself (resulting in an infinite recursion on execution) for the binaries in /bin.t
If we have the ability to enable remote JMX we should also support setting credentials for that because they become required if you turn it on.
If you're on a multi user system you don't want to have the password in the nix-store. With the new jmxRolesFile option you can specify your own protected file instead.
Below that it works but only when supplying a custom password file with restricted permissions (i.e. outside the nix-store). We can't do that using an absolute path in the tests.
If the `seedAddresses` is not set, don't force `SimpleSeedProvider` to be in `seed_provider`. This could cause problems in a multi-datacenter deployment when a different seed provider is preferred.
0a15f75
to
0350312
Compare
Oh, I was responsible for those conflicts 😆 |
Thanks @JohnAZoidberg |
The NixOS manual doesn't seem to build with this merged:
|
Manual build broken by 79f7f89, which is part of pull request NixOS#59179 (Fix Cassandra, improve config and tests). The issue was just a small error because of an unbalanced <literal/> tag, so only a "/" was missing :-) Signed-off-by: aszlig <aszlig@nix.build> Cc: @aanderse
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.
Just some minor improvement comments, but I can't say I understand nix well enough to judge completely.
cp "$cassandraEnvPkg" "$out/cassandra-env.sh" | ||
|
||
# Delete default JMX Port, otherwise we can't set it using env variable | ||
sed -i '/JMX_PORT="7199"/d' "$out/cassandra-env.sh" |
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.
If the source line ever changes, this will just fail silently?
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.
If they remove or change this line, sed will not remove it and not issue a warning.
substituteInPlace
would warn, but it doesn't have an option to delete an entire line.
I think it'll be fine if I implement the test for jmxPort
like you suggested below.
networking.firewall.enable = false; | ||
services.cassandra = cassandraCfg // extra; | ||
networking = { | ||
firewall.allowedTCPPorts = [ 7000 7199 9042 ]; |
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.
Instead of 7199
, don't you want jmxPort
?
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.
Good idea, see #65616
The change to "NixOS Test Cluster" in NixOS#59179 broke startup of existing clusters that used the previously-default cluster name "Test Cluster": ERROR 23:00:47 Fatal exception during initialization org.apache.cassandra.exceptions.ConfigurationException: Saved cluster name Test Cluster != configured name NixOS Test Cluster Fixes NixOS#63388.
Motivation for this change
cassandra-env.sh
.The test doesn't work - it doesn't work without this PR. I'll figure out why, when I have time. Seems like a race condition of the VMs starting, it's not a problem with the module itself, rather the tests.
[EDIT]: I think I fixed the tests, please have ofborg run them.
I tested manually on my system that the different configuration options actually have the desired effect.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)