mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
cassandra_3_0, cassandra_3_11: remove due to EOL
Cassandra 3.0 and 3.11 are End of Life. https://cassandra.apache.org/_/blog/Apache-Cassandra-3.0.x-and-3.11.x-End-of-Life-Announcement.html
This commit is contained in:
parent
b1f195b8f8
commit
ae11d4be17
6 changed files with 16 additions and 34 deletions
|
@ -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/
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -109,17 +101,17 @@ let
|
|||
|
||||
fullJvmOptions =
|
||||
cfg.jvmOpts
|
||||
++ [
|
||||
# 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.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"
|
||||
];
|
||||
|
||||
commonEnv = {
|
||||
|
@ -169,7 +161,7 @@ in
|
|||
};
|
||||
|
||||
package = mkPackageOption pkgs "cassandra" {
|
||||
example = "cassandra_3_11";
|
||||
example = "cassandra_4";
|
||||
};
|
||||
|
||||
jvmOpts = mkOption {
|
||||
|
@ -462,14 +454,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 +481,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>.
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
|
|
@ -281,8 +281,6 @@ in
|
|||
calibre-server = import ./calibre-server.nix { inherit pkgs runTest; };
|
||||
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 { };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue