Skip to content

Commit

Permalink
Fix zookeeper initialization (#8433)
Browse files Browse the repository at this point in the history
  • Loading branch information
silh committed Apr 3, 2024
1 parent e2b2d85 commit cda5609
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,14 @@ protected void containerIsStarting(InspectContainerResponse containerInfo) {
// exporting KAFKA_ADVERTISED_LISTENERS with the container hostname
command += String.format("export KAFKA_ADVERTISED_LISTENERS=%s\n", kafkaAdvertisedListeners);

if (this.kraftEnabled && isLessThanCP740()) {
if (!this.kraftEnabled || isLessThanCP740()) {
// Optimization: skip the checks
command += "echo '' > /etc/confluent/docker/ensure \n";
command += commandKraft();
}

if (!this.kraftEnabled) {
// Optimization: skip the checks
command += "echo '' > /etc/confluent/docker/ensure \n";
if (this.kraftEnabled) {
command += commandKraft();
} else if (this.externalZookeeperConnect == null) {
command += commandZookeeper();
}

Expand Down

0 comments on commit cda5609

Please sign in to comment.