You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by ju...@apache.org on 2020/07/15 18:38:43 UTC

[kafka] branch 2.6 updated: KAFKA-10257 system test kafkatest.tests.core.security_rolling_upgrade_test fails (#9021)

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

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


The following commit(s) were added to refs/heads/2.6 by this push:
     new cbcb262  KAFKA-10257 system test kafkatest.tests.core.security_rolling_upgrade_test fails (#9021)
cbcb262 is described below

commit cbcb2621852edf0efeb52d005ca844b411f3c9a8
Author: Chia-Ping Tsai <ch...@gmail.com>
AuthorDate: Thu Jul 16 02:33:49 2020 +0800

    KAFKA-10257 system test kafkatest.tests.core.security_rolling_upgrade_test fails (#9021)
    
    security_rolling_upgrade_test may change the security listener and then restart Kafka servers. has_sasl and has_ssl get out-of-date due to cached _security_config. This PR offers a simple fix that we always check the changes of port mapping and then update the sasl/ssl flag.
    
    Reviewers:  Ismael Juma <is...@juma.me.uk>, Jun Rao <ju...@gmail.com>
---
 tests/kafkatest/services/kafka/kafka.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/kafkatest/services/kafka/kafka.py b/tests/kafkatest/services/kafka/kafka.py
index cbd5a06..8c4773e 100644
--- a/tests/kafkatest/services/kafka/kafka.py
+++ b/tests/kafkatest/services/kafka/kafka.py
@@ -222,9 +222,9 @@ class KafkaService(KafkaPathResolverMixin, JmxMixin, Service):
                                     interbroker_sasl_mechanism=self.interbroker_sasl_mechanism,
                                     listener_security_config=self.listener_security_config,
                                     tls_version=self.tls_version)
-            for port in self.port_mappings.values():
-                if port.open:
-                    self._security_config.enable_security_protocol(port.security_protocol)
+        for port in self.port_mappings.values():
+            if port.open:
+                self._security_config.enable_security_protocol(port.security_protocol)
         if self.zk.zk_sasl:
             self._security_config.enable_sasl()
             self._security_config.zk_sasl = self.zk.zk_sasl