showuon commented on a change in pull request #10811:
URL: https://github.com/apache/kafka/pull/10811#discussion_r667417274



##########
File path: core/src/main/scala/kafka/admin/ConfigCommand.scala
##########
@@ -236,9 +240,17 @@ object ConfigCommand extends Config {
     }
   }
 
-  private def describeConfigWithZk(zkClient: KafkaZkClient, opts: 
ConfigCommandOptions, adminZkClient: AdminZkClient): Unit = {
+  private[admin] def describeConfigWithZk(zkClient: KafkaZkClient, opts: 
ConfigCommandOptions, adminZkClient: AdminZkClient): Unit = {
     val configEntity = parseEntity(opts)
-    val describeAllUsers = configEntity.root.entityType == ConfigType.User && 
!configEntity.root.sanitizedName.isDefined && !configEntity.child.isDefined
+    val entityType = configEntity.root.entityType
+    val describeAllUsers = entityType == ConfigType.User && 
!configEntity.root.sanitizedName.isDefined && !configEntity.child.isDefined
+    val entityName = configEntity.fullSanitizedName
+    val errorMessage = s"--bootstrap-server option must be specified to 
describe $entityType"
+    if (entityType == ConfigType.Broker) {
+      // Dynamic broker configs can be described using ZooKeeper only if the 
corresponding broker is not running.
+      validateBrokersNotRunning(entityName, adminZkClient, zkClient, 
errorMessage)

Review comment:
       Make sure brokers not running for describe via --zookeeper




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to