git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/mesos: convert quorum to string
commit827ad85a1ebb36eb3be4bc5af5fcd72bcce4863e authorJaka Hudoklin <jakahudoklin@gmail.com> dateMon 1 Dec 2014, 16:57 (12 years ago) parent5fa87a9
1 file changed+10−10
nixos/modules/services/misc/mesos-master.nix+10−10
nixos/modules/services/misc/mesos-master.nix+10−10
@@ -4,11 +4,11 @@ with lib;
44
55let
66 cfg = config.services.mesos.master;
7−
7+
88in {
99
1010 options.services.mesos = {
11−
11+
1212 master = {
1313 enable = mkOption {
1414 description = "Whether to enable the Mesos Master.";
@@ -31,36 +31,36 @@ in {
3131 '';
3232 type = types.str;
3333 };
34−
34+
3535 workDir = mkOption {
3636 description = "The Mesos work directory.";
3737 default = "/var/lib/mesos/master";
3838 type = types.str;
3939 };
40−
40+
4141 extraCmdLineOptions = mkOption {
4242 description = ''
4343 Extra command line options for Mesos Master.
44−
44+
4545 See https://mesos.apache.org/documentation/latest/configuration/
4646 '';
4747 default = [ "" ];
4848 type = types.listOf types.string;
4949 example = [ "--credentials=VALUE" ];
5050 };
51−
51+
5252 quorum = mkOption {
5353 description = ''
5454 The size of the quorum of replicas when using 'replicated_log' based
5555 registry. It is imperative to set this value to be a majority of
5656 masters i.e., quorum > (number of masters)/2.
57−
57+
5858 If 0 will fall back to --registry=in_memory.
5959 '';
6060 default = 0;
6161 type = types.int;
6262 };
63−
63+
6464 logLevel = mkOption {
6565 description = ''
6666 The logging level used. Possible values:
@@ -86,7 +86,7 @@ in {
8686 ${pkgs.mesos}/bin/mesos-master \
8787 --port=${toString cfg.port} \
8888 --zk=${cfg.zk} \
89− ${if cfg.quorum == 0 then "--registry=in_memory" else "--registry=replicated_log --quorum=${cfg.quorum}"} \
89+ ${if cfg.quorum == 0 then "--registry=in_memory" else "--registry=replicated_log --quorum=${toString cfg.quorum}"} \
9090 --work_dir=${cfg.workDir} \
9191 --logging_level=${cfg.logLevel} \
9292 ${toString cfg.extraCmdLineOptions}
@@ -98,6 +98,6 @@ in {
9898 '';
9999 };
100100 };
101−
101+
102102}
103103