aiven-anton opened a new pull request, #22751:
URL: https://github.com/apache/kafka/pull/22751
In order to support node replacements during KRaft migration, and for a
cluster that has such replacements to remain possible to rollback, the storage
formatting tool must be able to produce a storage directory that can be rolled
back. Currently this is not the case, and the tool always produces a
meta.properties file with version=1.
When rollback is triggered on such a cluster that has had node replacements,
this results in a broker crash-loop with the below log.
```
Jul 02 14:56:32 kafka[25156]: [2026-07-02 14:56:32,647] ERROR Exiting Kafka
due to fatal exception during startup. (kafka.Kafka$)
java.lang.RuntimeException: Found unexpected
version in /srv/kafka/meta.properties. ZK-based brokers that are not migrating
only support version 0 (which is implicit when the `version` field is missing).
at
org.apache.kafka.metadata.properties.MetaPropertiesEnsemble.verify(MetaPropertiesEnsemble.java:489)
at
kafka.server.KafkaServer.startup(KafkaServer.scala:258)
at kafka.Kafka$.main(Kafka.scala:112)
at kafka.Kafka.main(Kafka.scala)
Jul 02 14:56:32 kafka[25156]: [2026-07-02 14:56:32,650] INFO shutting down
(kafka.server.KafkaServer)
```
This commit remedies this by introducing a new flag to the formatter tool
that makes it create a meta.properties with version=0 and compatible with
rollback. This matches what the broker itself does during a normal from-ZK
migration.
Documentation is updated both in the KRaft migration section and in the
generic section for provisioning nodes.
Delete this text and replace it with a detailed description of your change.
The
PR title and body will become the squashed commit message.
If you would like to tag individuals, add some commentary, upload images, or
include other supplemental information that should not be part of the
eventual
commit message, please use a separate comment.
If applicable, please include a summary of the testing strategy (including
rationale) for the proposed change. Unit and/or integration tests are
expected
for any behavior change and system tests should be considered for larger
changes.
--
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]