summary refs log tree commit diff
path: root/nixos/modules/services/misc/exhibitor.nix
diff options
context:
space:
mode:
authorJoel Thompson <joel@jthompson.io>2017-07-27 21:53:39 -0400
committerJoel Thompson <joel@jthompson.io>2017-07-28 15:54:48 -0400
commit168fbde17a2f3d53b77afa9287afaac4dfde8b14 (patch)
tree02663c836d27e9d4b4e47822e108de2836bc1c06 /nixos/modules/services/misc/exhibitor.nix
parentd460fd0f99b518f25adcb1b67e73b850aaa0a9c0 (diff)
downloadnixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar
nixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.gz
nixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.bz2
nixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.lz
nixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.xz
nixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.zst
nixpkgs-168fbde17a2f3d53b77afa9287afaac4dfde8b14.zip
exhibitor: Fix bug with automatic instance management
Exhibitor tests the auto-manage-instances config value to see if it's a
non-zero integer, rather than a true/false string, which was getting
put into the config before. This now causes autoManageInstances to
behave correctly.
Diffstat (limited to 'nixos/modules/services/misc/exhibitor.nix')
-rw-r--r--nixos/modules/services/misc/exhibitor.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/exhibitor.nix b/nixos/modules/services/misc/exhibitor.nix
index 1db42275867..600bd780e7b 100644
--- a/nixos/modules/services/misc/exhibitor.nix
+++ b/nixos/modules/services/misc/exhibitor.nix
@@ -15,9 +15,12 @@ let
     election-port=${toString cfg.zkElectionPort}
     cleanup-period-ms=${toString cfg.zkCleanupPeriod}
     servers-spec=${concatStringsSep "," cfg.zkServersSpec}
-    auto-manage-instances=${lib.boolToString cfg.autoManageInstances}
+    auto-manage-instances=${toString cfg.autoManageInstances}
     ${cfg.extraConf}
   '';
+  # NB: toString rather than lib.boolToString on cfg.autoManageInstances is intended.
+  # Exhibitor tests if it's an integer not equal to 0, so the empty string (toString false)
+  # will operate in the same fashion as a 0.
   configDir = pkgs.writeTextDir "exhibitor.properties" exhibitorConfig;
   cliOptionsCommon = {
     configtype = cfg.configType;