KAFKA-9863: update the deprecated --zookeeper option in the documentation into --bootstrap-server#8482
Conversation
|
@joestein @rajinisivaram @hachikuji , could you help review this PR? Thank you very much. |
rondagostino
left a comment
There was a problem hiding this comment.
Thanks for the PR! This is an excellent change. There is one other occurrences that should also be fixed. From git grep -n -- --zookeeper *.html:
docs/ops.html:97: > bin/kafka-preferred-replica-election.sh --zookeeper zk_host:port/chroot
|
|
||
| <pre class="brush: bash;"> | ||
| > bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type brokers --entity-name 0 --alter --add-config | ||
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-name 0 --alter --add-config |
There was a problem hiding this comment.
This specific change should not be made because the paragraph above is referring specifically to configuration "before starting brokers for bootstrapping". However, since it is talking about storing sensitive information, it is likely that this would be a TLS-enabled Zookeeper quorum. So I would suggest:
| > bin/kafka-configs.sh --zookeeper localhost:2181 --entity-type brokers --entity-name 0 --alter --add-config | |
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --entity-type brokers --entity-name 0 --alter --add-config | |
| > bin/kafka-configs.sh --zookeeper localhost:2182 --zk-tls-config-file zk_tls_config.properties --entity-type brokers --entity-name 0 --alter --add-config |
| <p>Create SCRAM credentials for user <i>alice</i> with password <i>alice-secret</i>: | ||
| <pre class="brush: bash;"> | ||
| > bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=alice-secret]' --entity-type users --entity-name alice | ||
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=alice-secret]' --entity-type users --entity-name alice |
There was a problem hiding this comment.
Same thing here and the examples below: this is about bootstrapping credentials.
| > bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=alice-secret]' --entity-type users --entity-name alice | |
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=alice-secret]' --entity-type users --entity-name alice | |
| > bin/kafka-configs.sh --zookeeper localhost:2182 --zk-tls-config-file zk_tls_config.properties --alter --add-config 'SCRAM-SHA-256=[iterations=8192,password=alice-secret],SCRAM-SHA-512=[password=alice-secret]' --entity-type users --entity-name alice |
| <p>The following examples also require a user <i>admin</i> for inter-broker communication which can be created using: | ||
| <pre class="brush: bash;"> | ||
| > bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[password=admin-secret],SCRAM-SHA-512=[password=admin-secret]' --entity-type users --entity-name admin | ||
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --add-config 'SCRAM-SHA-256=[password=admin-secret],SCRAM-SHA-512=[password=admin-secret]' --entity-type users --entity-name admin |
| <p>Existing credentials may be listed using the <i>--describe</i> option: | ||
| <pre class="brush: bash;"> | ||
| > bin/kafka-configs.sh --zookeeper localhost:2181 --describe --entity-type users --entity-name alice | ||
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --describe --entity-type users --entity-name alice |
| <p>Credentials may be deleted for one or more SCRAM mechanisms using the <i>--delete</i> option: | ||
| <pre class="brush: bash;"> | ||
| > bin/kafka-configs.sh --zookeeper localhost:2181 --alter --delete-config 'SCRAM-SHA-512' --entity-type users --entity-name alice | ||
| > bin/kafka-configs.sh --bootstrap-server localhost:9092 --alter --delete-config 'SCRAM-SHA-512' --entity-type users --entity-name alice |
1. keep --zookeeper argument in the places that is talking about configure zk before broker up 2. use --zookeeper --zk-tls-config-file when doing some security related action, ex: update password
|
Hi @rondagostino , thanks for the comments. What I've updated in bcc8155:
BTW, enable the Kafka client to use TLS connection with zookeeper is a really good KIP. Thank you very much. |
rondagostino
left a comment
There was a problem hiding this comment.
BTW, enable the Kafka client to use TLS connection with zookeeper is a really good KIP. Thank you very much.
You're welcome , @showuon -- thank you for these fixes. LGTM.
|
LGTM. Thanks, @showuon , @rondagostino |
|
Hi, don't know if this is the correct place but here is my issue: |
|
@gerardq : https://cwiki.apache.org/confluence/display/KAFKA/KIP-506%3A+Allow+setting+SCRAM+password+via+Admin+interface will address this in the future. |
Since V2.2.0, the -zookeeper option turned into deprecated because Kafka can directly connect to brokers with --bootstrap-server (KIP-377). But in the official documentation, there are many example commands use --zookeeper instead of --bootstrap-server. Follow the command in the documentation, you'll get this warning, which is not good.
Update configuration.html, ops.html, security.html files
Mainly update 2 commands:
bin/kafka-configs.sh --zookeeper localhost:2181 ...after:
bin/kafka-configs.sh --bootstrap-server localhost:9092 ...bin/kafka-reassign-partitions.sh --zookeeper localhost:2181 ...after:
bin/kafka-reassign-partitions.sh --bootstrap-server localhost:9092 ...JIRA: https://issues.apache.org/jira/browse/KAFKA-9863
Committer Checklist (excluded from commit message)