diff options
author | Joel Thompson <joel@jthompson.io> | 2017-07-27 21:53:39 -0400 |
---|---|---|
committer | Joel Thompson <joel@jthompson.io> | 2017-07-28 15:54:48 -0400 |
commit | 168fbde17a2f3d53b77afa9287afaac4dfde8b14 (patch) | |
tree | 02663c836d27e9d4b4e47822e108de2836bc1c06 /nixos/modules | |
parent | d460fd0f99b518f25adcb1b67e73b850aaa0a9c0 (diff) | |
download | nixlib-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar nixlib-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.gz nixlib-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.bz2 nixlib-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.lz nixlib-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.xz nixlib-168fbde17a2f3d53b77afa9287afaac4dfde8b14.tar.zst nixlib-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')
-rw-r--r-- | nixos/modules/services/misc/exhibitor.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/exhibitor.nix b/nixos/modules/services/misc/exhibitor.nix index 1db422758671..600bd780e7b0 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; |