[
https://issues.apache.org/jira/browse/KAFKA-19988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18047097#comment-18047097
]
ASF GitHub Bot commented on KAFKA-19988:
----------------------------------------
harmadasg commented on PR #760:
URL: https://github.com/apache/kafka-site/pull/760#issuecomment-3683837297
@mumrah thanks for the approve. You are correct, this is only a possible
problem for ZooKeeper based cluster ids.
Unfortunately I don't have the option to merge the PR (maybe because the
failing CI check?) Could you please do it for me? Or in case we have to do
something about the docker image issue, what would be the next step?
> KRaft migration doc should account for ZK cluster id with a leading dash
> ------------------------------------------------------------------------
>
> Key: KAFKA-19988
> URL: https://issues.apache.org/jira/browse/KAFKA-19988
> Project: Kafka
> Issue Type: Bug
> Components: docs, documentation, kraft, migration
> Affects Versions: 3.9.1
> Reporter: Gergely Harmadás
> Assignee: Gergely Harmadás
> Priority: Minor
> Fix For: 3.9.2
>
>
> When preparing for the migration, there is a small chance that the retrieved
> cluster id from ZooKeeper contains a leading dash. Currently the 3.9
> documentation specifies the following during the step "Provisioning the KRaft
> controller quorum":
> {code:bash}
> # Save the previously retrieved cluster ID from ZooKeeper in a variable
> called zk-cluster-id
> $ bin/kafka-storage.sh format --standalone -t <zk-cluster-id> -c
> config/kraft/controller.properties{code}
> However the above command will fail with a less fortunate cluster id like
> -{{{}Yh6XyBIQ9CeAlMwJ8f7Hg{}}}, eg.:
> {noformat}
> bin/kafka-storage.sh format --standalone -t -Yh6XyBIQ9CeAlMwJ8f7Hg -c
> config/server.properties
> 25/12/12 09:24:54 INFO utils.Log4jControllerRegistration$: [main]:
> Registered `kafka:type=kafka.Log4jController` MBean
> usage: kafka-storage format [-h] --config CONFIG --cluster-id CLUSTER_ID
> [--add-scram ADD_SCRAM] [--ignore-formatted] [--release-version
> RELEASE_VERSION] [--feature FEATURE] [--standalone |
> --no-initial-controllers | --initial-controllers
> INITIAL_CONTROLLERS]
> kafka-storage: error: argument --cluster-id/-t: expected one argument
> {noformat}
> A similar problem came up with KRaft which was addressed in KAFKA-13741. In
> our case the cluster id is already specified, there is no way to change it. I
> was able to come up with a simple solution by using the full name of the
> argument like "--cluster-id=<zk-cluster-id>" instead of the shorthand "-t
> <zk-cluster-id>". Full example:
> {code:bash}
> bin/kafka-storage.sh format --cluster-id=-Yh6XyBIQ9CeAlMwJ8f7Hg -c
> config/kraft/controller.properties{code}
> I would propose to change the documentation based on my findings so we will
> be able to cover also ZooKeeper based cluster ids with a leading dash.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)