Fix for zookeeper id
zookeeper id should be a value between 1 and 255. uid can be bigger than 255, so it should be calculated Change-Id: If1dcecde8f066b1e27b5c2f0331ee5dc0b0c0804 Closes-bug: #1622008 Signed-off-by: Illia Polliul <ipolliul@mirantis.com>
This commit is contained in:
parent
bec24879ca
commit
92746f72ee
|
@ -33,15 +33,20 @@ class contrail::database {
|
|||
sysctl::value { 'vm.swappiness':
|
||||
value => '10'
|
||||
}
|
||||
|
||||
if roles_include($contrail::contrail_controller_roles) {
|
||||
$cassandra_ips = $::contrail::contrail_controller_ips
|
||||
$cassandra_seeds = $contrail::primary_contrail_controller_ip
|
||||
$cluster_name = 'Contrail'
|
||||
$priv_ip = $::contrail::address
|
||||
# Zookeeper
|
||||
|
||||
# Zookeeper
|
||||
# this is a remanider from dividing by 255
|
||||
# + 1 is to avoid it being 0 if uid is a multiplicator of 255
|
||||
$zookeeper_id = $contrail::uid % 255 + 1
|
||||
package { 'zookeeper': } ->
|
||||
file { '/etc/zookeeper/conf/myid':
|
||||
content => $contrail::uid,
|
||||
content => "${zookeeper_id}\n",
|
||||
require => Package['zookeeper'],
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue