diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-06-09 11:29:05 +0200 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-06-09 11:40:33 +0200 |
commit | 054a3c0321d7c7894eac7562e4405edea159223f (patch) | |
tree | ad3ed41668ca489fca921cadd8b689f117b441e3 /nixos | |
parent | 208d466c21cd51e64ef9b8a32462af9b2991d78d (diff) | |
download | nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.tar nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.tar.gz nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.tar.bz2 nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.tar.lz nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.tar.xz nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.tar.zst nixpkgs-054a3c0321d7c7894eac7562e4405edea159223f.zip |
nixos/graphite-service: clean up restartTriggers
Currently, the restartTriggers are abusing the systemd unit file in that the cfg.carbon.config/storageAggregation/... option text is pasted into the unit file. Even though this sort-of works (the service is restarted if the config changes) this causes systemd to print error messages about invalid sections (rightfully so!). The correct use of restartTriggers is to list storage paths, which is what this change does. If any of the cfg.carbon/config/storageAggregation/... options change, configDir will get a new hash. It is not as "fine grained" as the current version, but it is not abusing the interface. Also, remove unneeded 'waitress' in one of the restartTriggers, because it is already listed as part of the service config.
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/monitoring/graphite.nix | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix index 8ef6b8d029e..dbfe0ee182a 100644 --- a/nixos/modules/services/monitoring/graphite.nix +++ b/nixos/modules/services/monitoring/graphite.nix @@ -191,10 +191,7 @@ in { }; restartTriggers = [ pkgs.pythonPackages.carbon - cfg.carbon.config - cfg.carbon.storageAggregation - cfg.carbon.storageSchemas - cfg.carbon.rewriteRules + configDir ]; preStart = '' mkdir -p ${cfg.dataDir}/whisper @@ -215,7 +212,8 @@ in { Group = "graphite"; }; restartTriggers = [ - pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.aggregationRules + pkgs.pythonPackages.carbon + configDir ]; }; @@ -231,7 +229,8 @@ in { Group = "graphite"; }; restartTriggers = [ - pkgs.pythonPackages.carbon cfg.carbon.config cfg.carbon.relayRules + pkgs.pythonPackages.carbon + configDir ]; }; @@ -274,7 +273,6 @@ in { ''; restartTriggers = [ pkgs.python27Packages.graphite_web - pkgs.python27Packages.waitress ]; }; |