You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by js...@apache.org on 2024/10/01 17:21:52 UTC

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

This is an automated email from the ASF dual-hosted git repository.

jsancio pushed a commit to branch 3.9
in repository https://gitbox.apache.org/repos/asf/kafka.git

commit edd77c1e2576b3e379db816530fec578b8ba1637
Author: Bill Bejeck <bb...@apache.org>
AuthorDate: Sun Sep 15 14:26:06 2024 -0400

    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 <ah...@confluent.io>, Chia-Ping Tsai <ch...@gmail.com>
---
 tests/kafkatest/services/kafka/kafka.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kafkatest/services/kafka/kafka.py b/tests/kafkatest/services/kafka/kafka.py
index f154e2049c0..6987bbd05de 100644
--- a/tests/kafkatest/services/kafka/kafka.py
+++ b/tests/kafkatest/services/kafka/kafka.py
@@ -890,7 +890,7 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service):
             else:
                 self.controller_quorum_voters = ','.join(["%s@%s" % (self.controller_quorum.idx(node) + first_node_id - 1,
                                                                      bootstrap_server)
-                                                          for bootstrap_server in controller_quorum_bootstrap_servers])
+                                                          for bootstrap_server in controller_quorum_bootstrap_servers.split(',')])
             # define controller.listener.names
             self.controller_listener_names = ','.join(self.controller_listener_name_list(node))
             # define sasl.mechanism.controller.protocol to match the isolated quorum if one exists