nixos/cassandra: Don't force SimpleSeedProvider
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.
This commit is contained in:
parent
8e5ba87b36
commit
03503121da
@ -12,16 +12,17 @@ let
|
|||||||
cluster_name = cfg.clusterName;
|
cluster_name = cfg.clusterName;
|
||||||
partitioner = "org.apache.cassandra.dht.Murmur3Partitioner";
|
partitioner = "org.apache.cassandra.dht.Murmur3Partitioner";
|
||||||
endpoint_snitch = "SimpleSnitch";
|
endpoint_snitch = "SimpleSnitch";
|
||||||
seed_provider =
|
|
||||||
[{ class_name = "org.apache.cassandra.locator.SimpleSeedProvider";
|
|
||||||
parameters = [ { seeds = concatStringsSep "," cfg.seedAddresses; } ];
|
|
||||||
}];
|
|
||||||
data_file_directories = [ "${cfg.homeDir}/data" ];
|
data_file_directories = [ "${cfg.homeDir}/data" ];
|
||||||
commitlog_directory = "${cfg.homeDir}/commitlog";
|
commitlog_directory = "${cfg.homeDir}/commitlog";
|
||||||
saved_caches_directory = "${cfg.homeDir}/saved_caches";
|
saved_caches_directory = "${cfg.homeDir}/saved_caches";
|
||||||
} // (if lib.versionAtLeast cfg.package.version "3"
|
} // (lib.optionalAttrs (cfg.seedAddresses != []) {
|
||||||
then { hints_directory = "${cfg.homeDir}/hints"; }
|
seed_provider = [{
|
||||||
else {})
|
class_name = "org.apache.cassandra.locator.SimpleSeedProvider";
|
||||||
|
parameters = [ { seeds = concatStringsSep "," cfg.seedAddresses; } ];
|
||||||
|
}];
|
||||||
|
}) // (lib.optionalAttrs (lib.versionAtLeast cfg.package.version "3") {
|
||||||
|
hints_directory = "${cfg.homeDir}/hints";
|
||||||
|
})
|
||||||
);
|
);
|
||||||
cassandraConfigWithAddresses = cassandraConfig //
|
cassandraConfigWithAddresses = cassandraConfig //
|
||||||
( if cfg.listenAddress == null
|
( if cfg.listenAddress == null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user