Skip to content
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

cassandra_3_0, cassandra_3_11: remove due to EOL #392377

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/release-notes/rl-2505.section.md
Original file line number Diff line number Diff line change
@@ -29,6 +29,8 @@
It should generally be replaced with `rustPlatform.fetchCargoVendor`, but `rustPlatform.importCargoLock` may also be appropriate in some circumstances.
`rustPlatform.buildRustPackage` users must set `useFetchCargoVendor` to `true` and regenerate the `cargoHash`.

- `cassandra_3_0` and `cassandra_3_11` have been removed as they have reached end-of-life. Please update to `cassandra_4`. See the [changelog](https://github.com/apache/cassandra/blob/cassandra-4.0.17/NEWS.txt) for more information about the upgrade process.

- NetBox was updated to `>= 4.2.0`. Have a look at the breaking changes
of the [4.1 release](https://github.com/netbox-community/netbox/releases/tag/v4.1.0)
and the [4.2 release](https://github.com/netbox-community/netbox/releases/tag/v4.2.0),
32 changes: 9 additions & 23 deletions nixos/modules/services/databases/cassandra.nix
Original file line number Diff line number Diff line change
@@ -24,10 +24,6 @@ let

cfg = config.services.cassandra;

atLeast3 = versionAtLeast cfg.package.version "3";
atLeast3_11 = versionAtLeast cfg.package.version "3.11";
atLeast4 = versionAtLeast cfg.package.version "4";

defaultUser = "cassandra";

cassandraConfig = flip recursiveUpdate cfg.extraConfig (
@@ -41,6 +37,7 @@ let
data_file_directories = [ "${cfg.homeDir}/data" ];
commitlog_directory = "${cfg.homeDir}/commitlog";
saved_caches_directory = "${cfg.homeDir}/saved_caches";
hints_directory = "${cfg.homeDir}/hints";
}
// optionalAttrs (cfg.seedAddresses != [ ]) {
seed_provider = [
@@ -50,9 +47,6 @@ let
}
];
}
// optionalAttrs atLeast3 {
hints_directory = "${cfg.homeDir}/hints";
}
);

cassandraConfigWithAddresses =
@@ -97,9 +91,7 @@ let
# Delete default password file
sed -i '/-Dcom.sun.management.jmxremote.password.file=\/etc\/cassandra\/jmxremote.password/d' "$out/cassandra-env.sh"

${lib.optionalString atLeast4 ''
cp $package/conf/jvm*.options $out/
''}
cp $package/conf/jvm*.options $out/
'';
};

@@ -112,14 +104,12 @@ let
++ optionals (cfg.jmxRoles != [ ]) [
"-Dcom.sun.management.jmxremote.authenticate=true"
"-Dcom.sun.management.jmxremote.password.file=${cfg.jmxRolesFile}"
]
++ optionals cfg.remoteJmx [
"-Djava.rmi.server.hostname=${cfg.rpcAddress}"
]
++ optionals atLeast4 [
# Historically, we don't use a log dir, whereas the upstream scripts do
# expect this. We override those by providing our own -Xlog:gc flag.
"-Xlog:gc=warning,heap*=warning,age*=warning,safepoint=warning,promotion*=warning"
]
++ optionals cfg.remoteJmx [
"-Djava.rmi.server.hostname=${cfg.rpcAddress}"
];

commonEnv = {
@@ -169,7 +159,7 @@ in
};

package = mkPackageOption pkgs "cassandra" {
example = "cassandra_3_11";
example = "cassandra_4";
};

jvmOpts = mkOption {
@@ -462,14 +452,11 @@ in

jmxRolesFile = mkOption {
type = types.nullOr types.path;
default = if atLeast3_11 then pkgs.writeText "jmx-roles-file" defaultJmxRolesFile else null;
defaultText = literalMD ''generated configuration file if version is at least 3.11, otherwise `null`'';
default = pkgs.writeText "jmx-roles-file" defaultJmxRolesFile;
defaultText = "generated configuration file";
example = "/var/lib/cassandra/jmx.password";
description = ''
Specify your own jmx roles file.

Make sure the permissions forbid "others" from reading the file if
you're using Cassandra below version 3.11.
'';
};
};
@@ -492,8 +479,7 @@ in
assertion = cfg.remoteJmx -> cfg.jmxRolesFile != null;
message = ''
If you want JMX available remotely you need to set a password using
<literal>jmxRoles</literal> or <literal>jmxRolesFile</literal> if
using Cassandra older than v3.11.
<literal>jmxRoles</literal>.
'';
}
];
2 changes: 0 additions & 2 deletions nixos/tests/all-tests.nix
Original file line number Diff line number Diff line change
@@ -245,8 +245,6 @@ in {
calibre-server = handleTest ./calibre-server.nix {};
canaille = handleTest ./canaille.nix {};
castopod = handleTest ./castopod.nix {};
cassandra_3_0 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_3_0; };
cassandra_3_11 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_3_11; };
cassandra_4 = handleTest ./cassandra.nix { testPackage = pkgs.cassandra_4; };
centrifugo = runTest ./centrifugo.nix;
ceph-multi-node = handleTestOn [ "aarch64-linux" "x86_64-linux" ] ./ceph-multi-node.nix {};
2 changes: 1 addition & 1 deletion pkgs/servers/nosql/cassandra/generic.nix
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
which,
jre,
nixosTests,
# generation is the attribute version suffix such as 3_11 in pkgs.cassandra_3_11
# generation is the attribute version suffix such as 4 in pkgs.cassandra_4
generation,
version,
sha256,
2 changes: 2 additions & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
@@ -270,6 +270,8 @@ mapAliases {
cargo-information = throw "'cargo-information' has been removed due to being merged upstream into 'cargo'"; # Added 2025-03-09
cargo-inspect = throw "'cargo-inspect' has been removed due to lack of upstream maintenance. Upstream recommends cargo-expand."; # Added 2025-01-26
cargo-web = throw "'cargo-web' has been removed due to lack of upstream maintenance"; # Added 2025-01-26
cassandra_3_0 = throw "'cassandra_3_0' has been removed has it reached end-of-life"; # Added 2025-03-23
cassandra_3_11 = throw "'cassandra_3_11' has been removed has it reached end-of-life"; # Added 2025-03-23
cawbird = throw "cawbird has been abandoned upstream and is broken anyways due to Twitter closing its API";
certmgr-selfsigned = certmgr; # Added 2023-11-30
cgal_4 = throw "cgal_4 has been removed as it is obsolete use cgal instead"; # Added 2024-12-30
8 changes: 0 additions & 8 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -11044,14 +11044,6 @@ with pkgs;

appdaemon = callPackage ../servers/home-assistant/appdaemon.nix { };

cassandra_3_0 = callPackage ../servers/nosql/cassandra/3.0.nix {
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
python = python2;
};
cassandra_3_11 = callPackage ../servers/nosql/cassandra/3.11.nix {
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
python = python2;
};
cassandra_4 = callPackage ../servers/nosql/cassandra/4.nix {
# Effective Cassandra 4.0.2 there is full Java 11 support
# -- https://cassandra.apache.org/doc/latest/cassandra/new/java11.html