diff --git a/manifests/config.pp b/manifests/config.pp index f62053f6a..a88f60d75 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -55,6 +55,7 @@ $init_limit = 10, $sync_limit = 5, $leader = true, + $max_session_timeout = undef, ) { require zookeeper::install diff --git a/manifests/init.pp b/manifests/init.pp index 30b89fa02..97be30bba 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -54,7 +54,8 @@ $packages = ['zookeeper'], $repo = undef, $install_java = false, - $java_package = undef + $java_package = undef, + $max_session_timeout = undef, ) { validate_array($packages) @@ -102,6 +103,7 @@ tracefile_threshold => $tracefile_threshold, max_allowed_connections => $max_allowed_connections, peer_type => $peer_type, + max_session_timeout => $max_session_timeout, }-> class { 'zookeeper::service': cfg_dir => $cfg_dir, diff --git a/templates/conf/zoo.cfg.erb b/templates/conf/zoo.cfg.erb index f2f07e90a..cf7b2a7d4 100644 --- a/templates/conf/zoo.cfg.erb +++ b/templates/conf/zoo.cfg.erb @@ -83,3 +83,7 @@ maxClientCnxns=<%= @max_allowed_connections %> # Zookeeper peer type peerType=<%= @peer_type %> <% end -%> + +<% if @max_session_timeout -%> +maxSessionTimeout=<%= @max_session_timeout %> +<% end -%>