trust-dns: bump StartLimitBurst so systemd doesnt abort the service too early
This commit is contained in:
@@ -187,7 +187,11 @@ in
|
||||
User = "trust-dns";
|
||||
Group = "trust-dns";
|
||||
wantedBy = lib.mkForce [];
|
||||
# there can be a lot of restarts as interfaces toggle,
|
||||
# particularly around the DHCP/NetworkManager stuff.
|
||||
StartLimitBurst = 60;
|
||||
};
|
||||
# trust-dns.unitConfig.StartLimitIntervalSec = 60;
|
||||
}
|
||||
(lib.mapAttrs'
|
||||
(flavor: instanceConfig: {
|
||||
|
@@ -108,11 +108,11 @@ def apply_zone(nm_config: NmConfig, ops: Ops) -> None:
|
||||
# formatting preference: when these configs are `cat`d together, empty-line separators help distinguish
|
||||
specialized_config = '\n' + specialized_config
|
||||
|
||||
# TODO: i'm not sure how this behaves in the presence of multiple interfaces.
|
||||
# do i want to persist config-per-interface, and then merge them, on every change?
|
||||
conn_config_path = f"{DHCP_CONFIGS}/{nm_config.conn_id}.toml"
|
||||
ops.makedirs(DHCP_CONFIGS)
|
||||
ops.write_file(conn_config_path, specialized_config)
|
||||
# TODO: don't restart if the merged config is expected to be the same;
|
||||
# restarts are costly, especially since they dump the cache!
|
||||
ops.exec_([
|
||||
"systemctl",
|
||||
"restart",
|
||||
|
Reference in New Issue
Block a user