From 8ddc79bf5b0343bf308c8d0b629eecde98b9e5a1 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 21 Aug 2023 19:03:56 +0200 Subject: [PATCH] cluster/services/monitoring: make grafana-ha more resilient to weird failures --- cluster/services/monitoring/grafana-ha.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster/services/monitoring/grafana-ha.nix b/cluster/services/monitoring/grafana-ha.nix index 9194574..5433700 100644 --- a/cluster/services/monitoring/grafana-ha.nix +++ b/cluster/services/monitoring/grafana-ha.nix @@ -105,9 +105,11 @@ in serviceConfig = base.serviceConfig // { ExecStart = "${consul.package}/bin/consul lock --shell=false services/grafana ${run}"; + ExecStopPost = "${svc.commands.deregister}"; # consul uses AF_NETLINK to determine interface addresses, even when just registering a service RestrictAddressFamilies = base.serviceConfig.RestrictAddressFamilies ++ [ "AF_NETLINK" ]; Restart = "on-failure"; + RestartSec = "10s"; }; }; };