Skip to content

Commit

Permalink
kafka replication factor should depend on list of database nodes
Browse files Browse the repository at this point in the history
Earlier zookeeper node list was same as database node list but it was changed
recently to be same as cfgm nodes. As a result, replication factor was getting
set wrongly if cfgm and database nodes are not same.
Closes-Bug: #1634397

Change-Id: Ib33dd446b18aee5174b7199d87a005bcaa533513
(cherry picked from commit 9127d0b)
  • Loading branch information
bansalnikhil committed Nov 2, 2016
1 parent 5a7de7f commit 5a34d52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrail_provisioning/database/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def fixup_kafka_server_properties(self, listen_ip):
local('sudo echo "delete.topic.enable=true" >> %s' % KAFKA_SERVER_PROPERTIES)

#Set replication factor to 2 if more than one kafka broker is available
if (len(zk_list)>1):
if (len(self._args.seed_list) > 1 or len(self._args.seed_list[0].split(','))>1):
if not self.file_pattern_check(KAFKA_SERVER_PROPERTIES, 'default.replication.factor'):
local('sudo echo "default.replication.factor=2" >> %s' % (KAFKA_SERVER_PROPERTIES))
KAFKA_LOG4J_PROPERTIES='/usr/share/kafka/config/log4j.properties'
Expand Down

0 comments on commit 5a34d52

Please sign in to comment.