MINOR: Need to split the controller bootstrap servers on ',' in list comprehenson (#17183)

Kafka Streams system tests were failing with this error:

Failed to parse host name from entry 3001@d for the configuration controller.quorum.voters.  Each entry should be in the form `{id}@{host}:{port}`.

The cause is that in kafka.py line 876, we create a delimited string from a list comprehension, but the input is a string itself, so each character gets appended vs. the bootstrap server string of host:port. To fix this, this PR adds split(',') to controller_quorum_bootstrap_servers. Note that this only applies when dynamicRaftQuorum=False

Reviewers: Alyssa Huang <ahuang@confluent.io>, Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Bill Bejeck 2024-09-15 14:26:06 -04:00 committed by GitHub
parent 6744a718c2
commit e1f11c6714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -875,7 +875,7 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service):
else: else:
self.controller_quorum_voters = ','.join(["%s@%s" % (self.controller_quorum.idx(node) + first_node_id - 1, self.controller_quorum_voters = ','.join(["%s@%s" % (self.controller_quorum.idx(node) + first_node_id - 1,
bootstrap_server) bootstrap_server)
for bootstrap_server in controller_quorum_bootstrap_servers]) for bootstrap_server in controller_quorum_bootstrap_servers.split(',')])
# define controller.listener.names # define controller.listener.names
self.controller_listener_names = ','.join(self.controller_listener_name_list(node)) self.controller_listener_names = ','.join(self.controller_listener_name_list(node))
# define sasl.mechanism.controller.protocol to match the isolated quorum if one exists # define sasl.mechanism.controller.protocol to match the isolated quorum if one exists