mumrah commented on code in PR #15754:
URL: https://github.com/apache/kafka/pull/15754#discussion_r1577997204


##########
tests/kafkatest/services/kafka/kafka.py:
##########
@@ -463,6 +463,18 @@ def reconfigure_zk_for_migration(self, kraft_quorum):
         # This is not added to "advertised.listeners" because of 
configured_for_zk_migration=True
         self.port_mappings[kraft_quorum.controller_listener_names] = 
kraft_quorum.port_mappings.get(kraft_quorum.controller_listener_names)
 
+    def downgrade_kraft_broker_to_zk(self, kraft_quorum):
+        self.configured_for_zk_migration = True
+        self.quorum_info = quorum.ServiceQuorumInfo(quorum.zk, self)
+        self.controller_quorum = kraft_quorum
+
+        # Set the migration properties
+        self.server_prop_overrides.extend([
+            ["zookeeper.metadata.migration.enable", "true"],
+            ["controller.quorum.voters", 
kraft_quorum.controller_quorum_voters],
+            ["controller.listener.names", 
kraft_quorum.controller_listener_names]
+        ])

Review Comment:
   Well, as long as `process.roles` is not set, a broker is in ZK mode. When 
reverting back to ZK mode, we can still have the migration configs set. Since 
the behavior added in KAFKA-16463 is only enabled when 
`zookeeper.metadata.migration.enable` is set, we include it in this test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to