Skip to content

Commit

Permalink
Update to RC3
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Scholz <[email protected]>
  • Loading branch information
scholzj committed Oct 22, 2024
1 parent 6df295e commit 4a84001
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public KafkaBrokerConfigurationBuilder withListeners(
}

// Control plane listener is on all ZooKeeper based brokers, needed during migration as well, when broker still using ZooKeeper but KRaft controllers are ready
if (node.broker() && kafkaMetadataConfigState.isZooKeeper()) {
if (node.broker() && kafkaMetadataConfigState.isZooKeeperToMigration()) {
writer.println("control.plane.listener.name=" + CONTROL_PLANE_LISTENER_NAME);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2781,16 +2781,11 @@ public void testListenersOnMigration() {
.withListeners("my-cluster", KAFKA_3_8_0, "my-namespace", singletonList(listener), listenerId -> "my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc", listenerId -> "9092")
.build();

if (state.isZooKeeper()) {
if (state.isZooKeeperToMigration()) {
// control plane is set as listener and advertised up to migration ...
assertThat(configuration, containsString("listeners=CONTROLPLANE-9090://0.0.0.0:9090,REPLICATION-9091://0.0.0.0:9091,PLAIN-9092://0.0.0.0:9092"));
assertThat(configuration, containsString("advertised.listeners=CONTROLPLANE-9090://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9090,REPLICATION-9091://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9091,PLAIN-9092://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9092"));
assertThat(configuration, containsString("control.plane.listener.name=CONTROLPLANE-9090"));
} else if (state.isZooKeeperToMigration()) {
// control plane is set as listener and advertised up to migration ...
assertThat(configuration, containsString("listeners=CONTROLPLANE-9090://0.0.0.0:9090,REPLICATION-9091://0.0.0.0:9091,PLAIN-9092://0.0.0.0:9092"));
assertThat(configuration, containsString("advertised.listeners=CONTROLPLANE-9090://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9090,REPLICATION-9091://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9091,PLAIN-9092://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9092"));
assertThat(configuration, not(containsString("control.plane.listener.name=CONTROLPLANE-9090")));
} else {
// ... it's removed when in post-migration because brokers are full KRaft-mode
assertThat(configuration, containsString("listeners=REPLICATION-9091://0.0.0.0:9091,PLAIN-9092://0.0.0.0:9092"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void testBrokerNodeConfigurationOnMigration() {

assertThat(configuration, containsString("node.id=0"));
// from ZK up to MIGRATION ...
if (state.isZooKeeper()) {
if (state.isZooKeeperToMigration()) {
// ... has ZooKeeper connection configured
assertThat(configuration, containsString("zookeeper.connect"));
// ... broker.id still set
Expand All @@ -141,15 +141,6 @@ public void testBrokerNodeConfigurationOnMigration() {
assertThat(configuration, containsString("control.plane.listener.name=CONTROLPLANE-9090"));
assertThat(configuration, containsString("listeners=CONTROLPLANE-9090://0.0.0.0:9090,REPLICATION-9091://0.0.0.0:9091,PLAIN-9092://0.0.0.0:9092"));
assertThat(configuration, containsString("advertised.listeners=CONTROLPLANE-9090://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9090,REPLICATION-9091://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9091,PLAIN-9092://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9092"));
} else if (state.isZooKeeperToMigration()) {
// ... has ZooKeeper connection configured
assertThat(configuration, containsString("zookeeper.connect"));
// ... broker.id still set
assertThat(configuration, containsString("broker.id=0"));
// ... control plane is set as listener and advertised
assertThat(configuration, not(containsString("control.plane.listener.name=CONTROLPLANE-9090")));
assertThat(configuration, containsString("listeners=CONTROLPLANE-9090://0.0.0.0:9090,REPLICATION-9091://0.0.0.0:9091,PLAIN-9092://0.0.0.0:9092"));
assertThat(configuration, containsString("advertised.listeners=CONTROLPLANE-9090://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9090,REPLICATION-9091://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9091,PLAIN-9092://my-cluster-brokers-0.my-cluster-kafka-brokers.my-namespace.svc:9092"));
} else {
assertThat(configuration, not(containsString("zookeeper.connect")));
assertThat(configuration, not(containsString("broker.id=0")));
Expand Down
4 changes: 2 additions & 2 deletions kafka-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@
format: 3.9
protocol: 3.9
metadata: 3.9
url: https://dist.apache.org/repos/dist/dev/kafka/3.9.0-rc2/kafka_2.13-3.9.0.tgz
checksum: 0F50048F9CEBBD37F5D69A3180E51B656F837E0C7ACF402DCDF8F47550F1C2EA4387C61D5BA5D9324135FDB72A1A413E434FAF6DC112AD90533351D1E15D9C42
url: https://dist.apache.org/repos/dist/dev/kafka/3.9.0-rc3/kafka_2.13-3.9.0.tgz
checksum: 0BB9C0CCCF69437E85BDC1D5F5E304F5133501C9E9527B35FDEFAB2794B3D028809EBC3EE48B6C53C7DFBC29E4E0B58FF0EFDA0915194F3ED465B64E2EAB9FE8
zookeeper: 3.8.4
third-party-libs: 3.9.x
supported: true
Expand Down

0 comments on commit 4a84001

Please sign in to comment.