You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/16 18:17:31 UTC
[GitHub] [kafka] niket-goel opened a new pull request #11070: Validate the controllerListener config on startup
niket-goel opened a new pull request #11070:
URL: https://github.com/apache/kafka/pull/11070
Also generate a better error if failing to startup controller due to an empty controllerListener config
*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*
*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mumrah commented on a change in pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#discussion_r672407194
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
+ socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
+ config.controllerListeners.head.listenerName))
+ } else {
+ fatal("No controllerListener defined for controller")
+ throw new IllegalArgumentException()
Review comment:
We have `ConfigException` for these such cases
##########
File path: core/src/main/scala/kafka/server/KafkaConfig.scala
##########
@@ -1914,6 +1914,8 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog: Boolean, dynamicConfigO
"offsets.commit.required.acks must be greater or equal -1 and less or equal to offsets.topic.replication.factor")
require(BrokerCompressionCodec.isValid(compressionType), "compression.type : " + compressionType + " is not valid." +
" Valid options are " + BrokerCompressionCodec.brokerCompressionOptions.mkString(","))
+ require(!processRoles.contains(ControllerRole) || controllerListeners.nonEmpty,
+ s"${KafkaConfig.ControllerListenerNamesProp} cannot be empty")
Review comment:
How about "[...] cannot be empty if the server has the controller role"
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
+ socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
+ config.controllerListeners.head.listenerName))
+ } else {
+ fatal("No controllerListener defined for controller")
Review comment:
Instead of "controllerListener" let's log the full property name
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
Review comment:
nit: need space after `if`
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] niket-goel commented on pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
niket-goel commented on pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#issuecomment-883629817
All tests failing due to the config validation are fixed in the new revision [1] barring one test, which is flaky and fails intermittently due to unrelated reasons and passes separately [2]
[1]
```
2256 tests completed, 1 failed
> Task :core:unitTest FAILED
FAILURE: Build failed with an exception.
SocketServerTest > testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend() FAILED
org.opentest4j.AssertionFailedError: Channel not closed after failed send
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:117)
at kafka.network.SocketServerTest.testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend(SocketServerTest.scala:1163)
```
[2]
```
❯ ./gradlew clean :core:test --tests kafka.network.SocketServerTest.testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend
> Configure project :
Starting build with version 3.1.0-SNAPSHOT using Gradle 7.1.1, Java 11 and Scala 2.13.6
> Task :core:compileScala
Unexpected javac output: warning: [options] bootstrap class path not set in conjunction with -source 8
Note: /Users/ngoel/Workspace/code/apache-kafka/kafka-fork/kafka/core/src/main/scala/kafka/tools/StreamsResetter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning.
> Task :core:compileTestScala
Unexpected javac output: warning: [options] bootstrap class path not set in conjunction with -source 8
1 warning.
> Task :core:test
SocketServerTest > testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend() PASSED
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 3m 52s
84 actionable tasks: 45 executed, 39 up-to-date
```
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] niket-goel commented on pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
niket-goel commented on pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#issuecomment-881665920
Looks like a lot of tests are failing with the exception I added. Will take a look.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mumrah commented on a change in pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#discussion_r672407194
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
+ socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
+ config.controllerListeners.head.listenerName))
+ } else {
+ fatal("No controllerListener defined for controller")
+ throw new IllegalArgumentException()
Review comment:
We have `ConfigException` for these such cases
##########
File path: core/src/main/scala/kafka/server/KafkaConfig.scala
##########
@@ -1914,6 +1914,8 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog: Boolean, dynamicConfigO
"offsets.commit.required.acks must be greater or equal -1 and less or equal to offsets.topic.replication.factor")
require(BrokerCompressionCodec.isValid(compressionType), "compression.type : " + compressionType + " is not valid." +
" Valid options are " + BrokerCompressionCodec.brokerCompressionOptions.mkString(","))
+ require(!processRoles.contains(ControllerRole) || controllerListeners.nonEmpty,
+ s"${KafkaConfig.ControllerListenerNamesProp} cannot be empty")
Review comment:
How about "[...] cannot be empty if the server has the controller role"
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
+ socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
+ config.controllerListeners.head.listenerName))
+ } else {
+ fatal("No controllerListener defined for controller")
Review comment:
Instead of "controllerListener" let's log the full property name
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
Review comment:
nit: need space after `if`
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] niket-goel commented on pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
niket-goel commented on pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#issuecomment-882782314
This PR ends up failing a bunch of existing unit tests. Taking a look at the failures. Will update the PR.
List of failed tests
```
ConnectionQuotasTest. testListenerConnectionRateLimitWhenActualRateAboveLimit()
SocketServerTest. testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend()
ControllerApisTest. testCreatePartitionsRequest()
ControllerApisTest. testCreateTopics()
ControllerApisTest. testDeleteTopicsById()
ControllerApisTest. testDeleteTopicsByName()
ControllerApisTest. testDeleteTopicsDisabled()
ControllerApisTest. testFetchSentToKRaft()
ControllerApisTest. testFetchSnapshotSentToKRaft()
ControllerApisTest. testHandleLegacyAlterConfigsErrors()
ControllerApisTest. testInvalidDeleteTopicsRequest()
ControllerApisTest. testInvalidIncrementalAlterConfigsResources()
ControllerApisTest. testNotAuthorizedToDeleteWithTopicExisting()
ControllerApisTest. testNotAuthorizedToDeleteWithTopicNotExisting()
ControllerApisTest. testNotControllerErrorPreventsDeletingTopics()
ControllerApisTest. testUnauthorizedBeginQuorumEpoch()
ControllerApisTest. testUnauthorizedBrokerRegistration()
ControllerApisTest. testUnauthorizedDescribeQuorum()
ControllerApisTest. testUnauthorizedEndQuorumEpoch()
ControllerApisTest. testUnauthorizedFetch()
ControllerApisTest. testUnauthorizedFetchSnapshot()
ControllerApisTest. testUnauthorizedHandleAllocateProducerIds()
ControllerApisTest. testUnauthorizedHandleAlterClientQuotas()
ControllerApisTest. testUnauthorizedHandleAlterIsrRequest()
ControllerApisTest. testUnauthorizedHandleAlterPartitionReassignments()
ControllerApisTest. testUnauthorizedHandleBrokerHeartBeatRequest()
ControllerApisTest. testUnauthorizedHandleIncrementalAlterConfigs()
ControllerApisTest. testUnauthorizedHandleListPartitionReassignments()
ControllerApisTest. testUnauthorizedHandleUnregisterBroker()
ControllerApisTest. testUnauthorizedVote()
KafkaRaftServerTest. testLoadMetaPropertiesWithInconsistentNodeId()
KafkaRaftServerTest. testSuccessfulLoadMetaProperties()
StorageToolTest. testConfigToLogDirectories()
StorageToolTest. testConfigToLogDirectoriesWithMetaLogDir()
StorageToolTest. testFormatWithInvalidClusterId()
```
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] mumrah commented on a change in pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
mumrah commented on a change in pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#discussion_r672407194
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
+ socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
+ config.controllerListeners.head.listenerName))
+ } else {
+ fatal("No controllerListener defined for controller")
+ throw new IllegalArgumentException()
Review comment:
We have `ConfigException` for these such cases
##########
File path: core/src/main/scala/kafka/server/KafkaConfig.scala
##########
@@ -1914,6 +1914,8 @@ class KafkaConfig(val props: java.util.Map[_, _], doLog: Boolean, dynamicConfigO
"offsets.commit.required.acks must be greater or equal -1 and less or equal to offsets.topic.replication.factor")
require(BrokerCompressionCodec.isValid(compressionType), "compression.type : " + compressionType + " is not valid." +
" Valid options are " + BrokerCompressionCodec.brokerCompressionOptions.mkString(","))
+ require(!processRoles.contains(ControllerRole) || controllerListeners.nonEmpty,
+ s"${KafkaConfig.ControllerListenerNamesProp} cannot be empty")
Review comment:
How about "[...] cannot be empty if the server has the controller role"
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
+ socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
+ config.controllerListeners.head.listenerName))
+ } else {
+ fatal("No controllerListener defined for controller")
Review comment:
Instead of "controllerListener" let's log the full property name
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -137,8 +137,14 @@ class ControllerServer(
credentialProvider,
apiVersionManager)
socketServer.startup(startProcessingRequests = false, controlPlaneListener = None, config.controllerListeners)
- socketServerFirstBoundPortFuture.complete(socketServer.boundPort(
- config.controllerListeners.head.listenerName))
+
+ if(config.controllerListeners.nonEmpty) {
Review comment:
nit: need space after `if`
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] niket-goel commented on a change in pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
niket-goel commented on a change in pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#discussion_r673567715
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -42,6 +42,7 @@ import org.apache.kafka.raft.RaftConfig
import org.apache.kafka.raft.RaftConfig.AddressSpec
import org.apache.kafka.server.authorizer.Authorizer
import org.apache.kafka.server.common.ApiMessageAndVersion
+import org.apache.zookeeper.server.quorum.QuorumPeerConfig.ConfigException
Review comment:
Thanks for catching that. It did feel like this was at an odd place.
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] niket-goel commented on pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
niket-goel commented on pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#issuecomment-882782314
This PR ends up failing a bunch of existing unit tests. Taking a look at the failures. Will update the PR.
List of failed tests
```
ConnectionQuotasTest. testListenerConnectionRateLimitWhenActualRateAboveLimit()
SocketServerTest. testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend()
ControllerApisTest. testCreatePartitionsRequest()
ControllerApisTest. testCreateTopics()
ControllerApisTest. testDeleteTopicsById()
ControllerApisTest. testDeleteTopicsByName()
ControllerApisTest. testDeleteTopicsDisabled()
ControllerApisTest. testFetchSentToKRaft()
ControllerApisTest. testFetchSnapshotSentToKRaft()
ControllerApisTest. testHandleLegacyAlterConfigsErrors()
ControllerApisTest. testInvalidDeleteTopicsRequest()
ControllerApisTest. testInvalidIncrementalAlterConfigsResources()
ControllerApisTest. testNotAuthorizedToDeleteWithTopicExisting()
ControllerApisTest. testNotAuthorizedToDeleteWithTopicNotExisting()
ControllerApisTest. testNotControllerErrorPreventsDeletingTopics()
ControllerApisTest. testUnauthorizedBeginQuorumEpoch()
ControllerApisTest. testUnauthorizedBrokerRegistration()
ControllerApisTest. testUnauthorizedDescribeQuorum()
ControllerApisTest. testUnauthorizedEndQuorumEpoch()
ControllerApisTest. testUnauthorizedFetch()
ControllerApisTest. testUnauthorizedFetchSnapshot()
ControllerApisTest. testUnauthorizedHandleAllocateProducerIds()
ControllerApisTest. testUnauthorizedHandleAlterClientQuotas()
ControllerApisTest. testUnauthorizedHandleAlterIsrRequest()
ControllerApisTest. testUnauthorizedHandleAlterPartitionReassignments()
ControllerApisTest. testUnauthorizedHandleBrokerHeartBeatRequest()
ControllerApisTest. testUnauthorizedHandleIncrementalAlterConfigs()
ControllerApisTest. testUnauthorizedHandleListPartitionReassignments()
ControllerApisTest. testUnauthorizedHandleUnregisterBroker()
ControllerApisTest. testUnauthorizedVote()
KafkaRaftServerTest. testLoadMetaPropertiesWithInconsistentNodeId()
KafkaRaftServerTest. testSuccessfulLoadMetaProperties()
StorageToolTest. testConfigToLogDirectories()
StorageToolTest. testConfigToLogDirectoriesWithMetaLogDir()
StorageToolTest. testFormatWithInvalidClusterId()
```
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] cmccabe merged pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
cmccabe merged pull request #11070:
URL: https://github.com/apache/kafka/pull/11070
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] niket-goel commented on pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
niket-goel commented on pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#issuecomment-882782314
This PR ends up failing a bunch of existing unit tests. Taking a look at the failures. Will update the PR.
List of failed tests
```
ConnectionQuotasTest. testListenerConnectionRateLimitWhenActualRateAboveLimit()
SocketServerTest. testClientDisconnectionWithOutstandingReceivesProcessedUntilFailedSend()
ControllerApisTest. testCreatePartitionsRequest()
ControllerApisTest. testCreateTopics()
ControllerApisTest. testDeleteTopicsById()
ControllerApisTest. testDeleteTopicsByName()
ControllerApisTest. testDeleteTopicsDisabled()
ControllerApisTest. testFetchSentToKRaft()
ControllerApisTest. testFetchSnapshotSentToKRaft()
ControllerApisTest. testHandleLegacyAlterConfigsErrors()
ControllerApisTest. testInvalidDeleteTopicsRequest()
ControllerApisTest. testInvalidIncrementalAlterConfigsResources()
ControllerApisTest. testNotAuthorizedToDeleteWithTopicExisting()
ControllerApisTest. testNotAuthorizedToDeleteWithTopicNotExisting()
ControllerApisTest. testNotControllerErrorPreventsDeletingTopics()
ControllerApisTest. testUnauthorizedBeginQuorumEpoch()
ControllerApisTest. testUnauthorizedBrokerRegistration()
ControllerApisTest. testUnauthorizedDescribeQuorum()
ControllerApisTest. testUnauthorizedEndQuorumEpoch()
ControllerApisTest. testUnauthorizedFetch()
ControllerApisTest. testUnauthorizedFetchSnapshot()
ControllerApisTest. testUnauthorizedHandleAllocateProducerIds()
ControllerApisTest. testUnauthorizedHandleAlterClientQuotas()
ControllerApisTest. testUnauthorizedHandleAlterIsrRequest()
ControllerApisTest. testUnauthorizedHandleAlterPartitionReassignments()
ControllerApisTest. testUnauthorizedHandleBrokerHeartBeatRequest()
ControllerApisTest. testUnauthorizedHandleIncrementalAlterConfigs()
ControllerApisTest. testUnauthorizedHandleListPartitionReassignments()
ControllerApisTest. testUnauthorizedHandleUnregisterBroker()
ControllerApisTest. testUnauthorizedVote()
KafkaRaftServerTest. testLoadMetaPropertiesWithInconsistentNodeId()
KafkaRaftServerTest. testSuccessfulLoadMetaProperties()
StorageToolTest. testConfigToLogDirectories()
StorageToolTest. testConfigToLogDirectoriesWithMetaLogDir()
StorageToolTest. testFormatWithInvalidClusterId()
```
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] cmccabe commented on a change in pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
cmccabe commented on a change in pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#discussion_r673566381
##########
File path: core/src/main/scala/kafka/server/ControllerServer.scala
##########
@@ -42,6 +42,7 @@ import org.apache.kafka.raft.RaftConfig
import org.apache.kafka.raft.RaftConfig.AddressSpec
import org.apache.kafka.server.authorizer.Authorizer
import org.apache.kafka.server.common.ApiMessageAndVersion
+import org.apache.zookeeper.server.quorum.QuorumPeerConfig.ConfigException
Review comment:
Hmm, it looks like this is the wrong ConfigException. The one you should be importing is `org.apache.kafka.common.config.ConfigException`
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [kafka] cmccabe commented on a change in pull request #11070: Validate the controllerListener config on startup
Posted by GitBox <gi...@apache.org>.
cmccabe commented on a change in pull request #11070:
URL: https://github.com/apache/kafka/pull/11070#discussion_r673566790
##########
File path: core/src/test/scala/unit/kafka/server/KafkaRaftServerTest.scala
##########
@@ -39,6 +39,8 @@ class KafkaRaftServerTest {
val configProperties = new Properties
configProperties.put(KafkaConfig.ProcessRolesProp, "broker,controller")
configProperties.put(KafkaConfig.NodeIdProp, nodeId.toString)
+ configProperties.put(KafkaConfig.AdvertisedListenersProp, "PLAINTEXT://127.0.0.1:9092")
Review comment:
It shouldn't be necessary to set these properties here, right? The defaults should work?
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org