From 168fbde17a2f3d53b77afa9287afaac4dfde8b14 Mon Sep 17 00:00:00 2001 From: Joel Thompson Date: Thu, 27 Jul 2017 21:53:39 -0400 Subject: [PATCH] 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. --- nixos/modules/services/misc/exhibitor.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;