nixos/patroni: remove raft
This commit is contained in:
parent
0db42a2ac8
commit
bca32a4163
@ -172,6 +172,8 @@
|
|||||||
- The `services.prometheus.exporters.minio` option has been removed, as it's upstream implementation was broken and unmaintained.
|
- The `services.prometheus.exporters.minio` option has been removed, as it's upstream implementation was broken and unmaintained.
|
||||||
Minio now has built-in [Prometheus metrics exposure](https://min.io/docs/minio/linux/operations/monitoring/collect-minio-metrics-using-prometheus.html), which can be used instead.
|
Minio now has built-in [Prometheus metrics exposure](https://min.io/docs/minio/linux/operations/monitoring/collect-minio-metrics-using-prometheus.html), which can be used instead.
|
||||||
|
|
||||||
|
- The `services.patroni.raft` option has been removed, as Raft has been [deprecated by upstream since 3.0.0](https://github.com/patroni/patroni/blob/master/docs/releases.rst#version-300)
|
||||||
|
|
||||||
## Other Notable Changes {#sec-release-24.11-notable-changes}
|
## Other Notable Changes {#sec-release-24.11-notable-changes}
|
||||||
|
|
||||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||||
|
@ -10,6 +10,15 @@ let
|
|||||||
configFile = format.generate configFileName cfg.settings;
|
configFile = format.generate configFileName cfg.settings;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
(lib.mkRemovedOptionModule [ "services" "patroni" "raft" ] ''
|
||||||
|
Raft has been deprecated by upstream.
|
||||||
|
'')
|
||||||
|
(lib.mkRemovedOptionModule [ "services" "patroni" "raftPort" ] ''
|
||||||
|
Raft has been deprecated by upstream.
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
options.services.patroni = {
|
options.services.patroni = {
|
||||||
|
|
||||||
enable = mkEnableOption "Patroni";
|
enable = mkEnableOption "Patroni";
|
||||||
@ -68,7 +77,7 @@ in
|
|||||||
type = types.path;
|
type = types.path;
|
||||||
default = "/var/lib/patroni";
|
default = "/var/lib/patroni";
|
||||||
description = ''
|
description = ''
|
||||||
Folder where Patroni data will be written, used by Raft as well if enabled.
|
Folder where Patroni data will be written, this is where the pgpass password file will be written.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -120,22 +129,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
raft = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
This will configure Patroni to use its own RAFT implementation instead of using a dedicated DCS.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
raftPort = mkOption {
|
|
||||||
type = types.port;
|
|
||||||
default = 5010;
|
|
||||||
description = ''
|
|
||||||
The port on which RAFT listens.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
softwareWatchdog = mkOption {
|
softwareWatchdog = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -178,12 +171,6 @@ in
|
|||||||
connect_address = "${cfg.nodeIp}:${toString cfg.restApiPort}";
|
connect_address = "${cfg.nodeIp}:${toString cfg.restApiPort}";
|
||||||
};
|
};
|
||||||
|
|
||||||
raft = mkIf cfg.raft {
|
|
||||||
data_dir = "${cfg.dataDir}/raft";
|
|
||||||
self_addr = "${cfg.nodeIp}:5010";
|
|
||||||
partner_addrs = map (ip: ip + ":5010") cfg.otherNodesIps;
|
|
||||||
};
|
|
||||||
|
|
||||||
postgresql = {
|
postgresql = {
|
||||||
listen = "${cfg.nodeIp}:${toString cfg.postgresqlPort}";
|
listen = "${cfg.nodeIp}:${toString cfg.postgresqlPort}";
|
||||||
connect_address = "${cfg.nodeIp}:${toString cfg.postgresqlPort}";
|
connect_address = "${cfg.nodeIp}:${toString cfg.postgresqlPort}";
|
||||||
@ -235,7 +222,7 @@ in
|
|||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
}
|
}
|
||||||
(mkIf (cfg.postgresqlDataDir == "/var/lib/postgresql/${cfg.postgresqlPackage.psqlSchema}" && cfg.dataDir == "/var/lib/patroni") {
|
(mkIf (cfg.postgresqlDataDir == "/var/lib/postgresql/${cfg.postgresqlPackage.psqlSchema}" && cfg.dataDir == "/var/lib/patroni") {
|
||||||
StateDirectory = "patroni patroni/raft postgresql postgresql/${cfg.postgresqlPackage.psqlSchema}";
|
StateDirectory = "patroni postgresql postgresql/${cfg.postgresqlPackage.psqlSchema}";
|
||||||
StateDirectoryMode = "0750";
|
StateDirectoryMode = "0750";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
@ -251,7 +238,6 @@ in
|
|||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.patroni
|
pkgs.patroni
|
||||||
cfg.postgresqlPackage
|
cfg.postgresqlPackage
|
||||||
(mkIf cfg.raft pkgs.python310Packages.pysyncobj)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.etc."${configFileName}".source = configFile;
|
environment.etc."${configFileName}".source = configFile;
|
||||||
|
Loading…
Reference in New Issue
Block a user