Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quorum_listen_on_all_ips option #168

Merged
merged 2 commits into from
Mar 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
Boolean $use_sasl_auth = $zookeeper::params::use_sasl_auth,
String $zoo_dir = $zookeeper::params::zoo_dir,
String $zoo_main = $zookeeper::params::zoo_main,
Boolean $quorum_listen_on_all_ips = $zookeeper::params::quorum_listen_on_all_ips,
# log4j properties
String $environment_file = $zookeeper::params::environment_file,
String $log4j_prop = $zookeeper::params::log4j_prop,
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
$client_ip = undef # use e.g. $::ipaddress if you want to bind to single interface
$client_port = 2181
$secure_client_port = undef
$quorum_listen_on_all_ips = false
$datastore = '/var/lib/zookeeper'
# datalogstore used to put transaction logs in separate location than snapshots
$datalogstore = undef
Expand Down
5 changes: 4 additions & 1 deletion templates/conf/environment.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
NAME=zookeeper
ZOOCFGDIR=<%= scope.lookupvar("zookeeper::cfg_dir") %>

<% if scope.lookupvar('zookeeper::install_method') != 'archive' and scope.lookupvar('zookeeper::service_provider') != 'systemd' -%>
<% if scope.lookupvar('zookeeper::install_method') != 'archive' and
(scope.lookupvar('zookeeper::service_provider') != 'systemd' or
(scope.lookupvar('zookeeper::service_provider') == 'systemd' and !scope.lookupvar('zookeeper::manage_service_file'))
)-%>
# TODO this is really ugly
# How to find out, which jars are needed?
# seems, that log4j requires the log4j.properties file to be in the classpath
Expand Down
3 changes: 3 additions & 0 deletions templates/conf/zoo.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ secureClientPort=<%= scope.lookupvar("zookeeper::secure_client_port") %>
<%= "server.#{id}=#{host}:%s:%s%s" % [scope.lookupvar("zookeeper::election_port"), scope.lookupvar("zookeeper::leader_port"), observer_text ] %>
<%- end -%>

# Bind election_port and leader_port to all interfaces (0.0.0.0)
quorumListenOnAllIPs=<%= scope.lookupvar("zookeeper::quorum_listen_on_all_ips") %>

# To avoid seeks ZooKeeper allocates space in the transaction log file in
# blocks of preAllocSize kilobytes. The default block size is 64M. One reason
# for changing the size of the blocks is to reduce the block size if snapshots
Expand Down