Luke Chen created KAFKA-19563:
---------------------------------

             Summary: Separate the controller config and admin config when add 
controller
                 Key: KAFKA-19563
                 URL: https://issues.apache.org/jira/browse/KAFKA-19563
             Project: Kafka
          Issue Type: Improvement
            Reporter: Luke Chen


Currently, when adding a controller via CLI, we have to run:
{code:java}
$ bin/kafka-metadata-quorum.sh --command-config config/controller.properties 
--bootstrap-server localhost:9092 add-controller

or

$ bin/kafka-metadata-quorum.sh --command-config config/controller.properties 
--bootstrap-controller localhost:9093 add-controller{code}
The controller.properties file is expected to be the controller property file 
that to be added. But if we want to pass configs to the admin client, what can 
we do?
{code:java}
bin/kafka-metadata-quorum.sh --help
usage: kafka-metadata-quorum [-h] [--command-config COMMAND_CONFIG] 
(--bootstrap-server BOOTSTRAP_SERVER | --bootstrap-controller 
BOOTSTRAP_CONTROLLER)
                             {describe,add-controller,remove-controller} 
...This tool describes kraft metadata quorum status.

...

 --command-config COMMAND_CONFIG
   Property file containing configs to be passed to Admin Client.  For 
add-controller,  the file is used to specify the controller properties as 
well.{code}
As this help output said, the "--command-config" can pass configs to admin 
client, but when add controller, it is also used as controller property file.

For example, we want to set the "client-id" to the admin client, when doing the 
add-controller, we have to add one more line in the controller.properties file:
{code:java}
client.id=test-admin-client{code}
This is not ideal to ask users to mix the client config into the controller 
config.

 

Maybe we can consider to add one more "--add-controller-command-config" for add 
controller use, or ask users to explicitly pass the controller id, dir UUID, 
... like remove-controller did, but the controller advertised listener value 
might be a little complicated for users.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to