cluster/services/monitoring: make grafana-ha more resilient to weird failures
This commit is contained in:
parent
821a2ce929
commit
8ddc79bf5b
1 changed files with 2 additions and 0 deletions
|
@ -105,9 +105,11 @@ in
|
||||||
|
|
||||||
serviceConfig = base.serviceConfig // {
|
serviceConfig = base.serviceConfig // {
|
||||||
ExecStart = "${consul.package}/bin/consul lock --shell=false services/grafana ${run}";
|
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
|
# consul uses AF_NETLINK to determine interface addresses, even when just registering a service
|
||||||
RestrictAddressFamilies = base.serviceConfig.RestrictAddressFamilies ++ [ "AF_NETLINK" ];
|
RestrictAddressFamilies = base.serviceConfig.RestrictAddressFamilies ++ [ "AF_NETLINK" ];
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
RestartSec = "10s";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue