[ 
https://issues.apache.org/jira/browse/KAFKA-18979?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935380#comment-17935380
 ] 

José Armando García Sancio commented on KAFKA-18979:
----------------------------------------------------

[~showuon] I fixed the incorrect reporting by {{{}kafka-features describe{}}}. 
The incorrect output in {{kafka-features upgrade}} is a little more complicated 
to fix for 4.0.0:
{code:java}
bin/kafka-features.sh --bootstrap-controller localhost:9093 upgrade 
--release-version 4.0
...
kraft.version was upgraded to 1. {code}
I'll fix that as part of KAFKA-16538.

> kraft.version wrongly upgraded to 1 after upgrading to v4.0
> -----------------------------------------------------------
>
>                 Key: KAFKA-18979
>                 URL: https://issues.apache.org/jira/browse/KAFKA-18979
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 4.0.0
>            Reporter: Luke Chen
>            Assignee: José Armando García Sancio
>            Priority: Blocker
>             Fix For: 4.0.0
>
>
> Since KAFKA-16538 is still not implemented, we don't support migration from 
> static quorum to dynamic quorum so far.
> Based on the 
> [doc|https://kafka.apache.org/40/documentation/#static_versus_dynamic_kraft_quorums],
>  when using `controller.quorum.voters` in the config, it'll be "static KRaft 
> quorum", and the `kraft.version` will be 0. But after upgrading to v4.0, it's 
> wrongly upgraded to 1. Under the `kraft.version` is set to 1, the dynamic 
> controller addition/removal will fail, which is confusing to users.
>  
> Steps to reproduce:
>  # start a 3.9 controller node with `controller.quorum.voters`, instead of 
> `controller.quorum.bootstrap.servers`
>  # Verify the `kraft.version` Finalized version is 0
> {code:java}
> bin/kafka-features.sh --bootstrap-controller localhost:9093 describe
> Feature: kraft.version    SupportedMinVersion: 0    SupportedMaxVersion: 1    
> FinalizedVersionLevel: 0    Epoch: 4
> Feature: metadata.version    SupportedMinVersion: 3.0-IV1    
> SupportedMaxVersion: 3.9-IV0    FinalizedVersionLevel: 3.9-IV0    Epoch: 
> 4{code}
>  # Upgrade to v4.0 following this 
> [doc|https://kafka.apache.org/40/documentation/#upgrade_servers_4_0_0]
> {code:java}
> bin/kafka-features.sh --bootstrap-controller localhost:9093 upgrade 
> --release-version 4.0
> group.version was upgraded to 1.
> kraft.version was upgraded to 1.
> metadata.version was upgraded to 25.
> transaction.version was upgraded to 2. {code}
>  # Verify the `kraft.version` Finalized version is 1 now
> {code:java}
> ./bin/kafka-features.sh --bootstrap-controller localhost:9093 describe        
>            
> Feature: eligible.leader.replicas.version    SupportedMinVersion: 0    
> SupportedMaxVersion: 1    FinalizedVersionLevel: 0    Epoch: 245
> Feature: group.version    SupportedMinVersion: 0    SupportedMaxVersion: 1    
> FinalizedVersionLevel: 1    Epoch: 245
> Feature: kraft.version    SupportedMinVersion: 0    SupportedMaxVersion: 1    
> FinalizedVersionLevel: 1    Epoch: 245
> Feature: metadata.version    SupportedMinVersion: 3.3-IV3    
> SupportedMaxVersion: 4.0-IV3    FinalizedVersionLevel: 4.0-IV3    Epoch: 245
> Feature: transaction.version    SupportedMinVersion: 0    
> SupportedMaxVersion: 2    FinalizedVersionLevel: 2    Epoch: 245{code}
>  # Run dynamically controller addition/removal
> {code:java}
> bin/kafka-metadata-quorum.sh --command-config 
> config/kraft/controller4.properties --bootstrap-controller localhost:9093 
> add-controller 
> org.apache.kafka.common.errors.UnsupportedVersionException: Cluster doesn't 
> support adding voter because the kraft.version feature is 0
> java.util.concurrent.ExecutionException: 
> org.apache.kafka.common.errors.UnsupportedVersionException: Cluster doesn't 
> support adding voter because the kraft.version feature is 0
>     at 
> java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
>     at 
> java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
>     at 
> org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:155)
>     at 
> org.apache.kafka.tools.MetadataQuorumCommand.handleAddController(MetadataQuorumCommand.java:432)
>     at 
> org.apache.kafka.tools.MetadataQuorumCommand.execute(MetadataQuorumCommand.java:148)
>     at 
> org.apache.kafka.tools.MetadataQuorumCommand.mainNoExit(MetadataQuorumCommand.java:81)
>     at 
> org.apache.kafka.tools.MetadataQuorumCommand.main(MetadataQuorumCommand.java:76)
> Caused by: org.apache.kafka.common.errors.UnsupportedVersionException: 
> Cluster doesn't support adding voter because the kraft.version feature is 0 
> {code}
>  
>  
>  



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

Reply via email to