[ 
https://issues.apache.org/jira/browse/KAFKA-21752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chia-Ping Tsai resolved KAFKA-21752.
------------------------------------
    Resolution: Fixed

> StreamsSmokeTest misses the REBALANCING -> RUNNING line when an earlier test 
> leaves /mnt/streams on the node
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-21752
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21752
>             Project: Kafka
>          Issue Type: Test
>          Components: streams, system tests
>            Reporter: PoAn Yang
>            Assignee: PoAn Yang
>            Priority: Major
>              Labels: flaky-test
>             Fix For: 3.9.3, 4.5.0, 4.4.1, 4.3.3, 4.2.3
>
>
> {{StreamsSmokeTest.test_streams}} fails with
> {noformat}
> TimeoutError("Never saw 'REBALANCING -> RUNNING' message ducker@ducker41")
> {noformat}
> even though the Streams client reached RUNNING in time.
> The test opens {{monitor_log(processor1.STDOUT_FILE)}} before it calls 
> {{{}processor1.start(){}}}. {{monitor_log}} records the current size of 
> {{/mnt/streams/streams.stdout}} as its starting offset. {{start()}} then 
> calls {{{}clean_node(){}}}, which runs {{{}rm -rf /mnt/streams{}}}, and the 
> new process writes {{streams.stdout}} from byte 0. {{wait_until}} keeps 
> running {{{}tail -c +<old size + 1> /mnt/streams/streams.stdout | grep 
> 'REBALANCING -> RUNNING'{}}}, so it skips everything in the first <old size> 
> bytes of the new file.
> The old file comes from an earlier test on the same node. 
> {{StreamsTestBaseService.clean_node()}} only removes {{/mnt/streams}} when 
> {{CLEAN_NODE_ENABLED}} is true. Tests that turn it off to keep state across 
> restarts also skip the cleanup at teardown, so the next test that gets the 
> node inherits their files. On trunk these tests are in 
> {{{}streams_named_repartition_topic_test.py{}}}, 
> {{{}streams_optimized_test.py{}}}, {{streams_static_membership_test.py}} and 
> {{{}streams_upgrade_test.py{}}}. 3.9 also has them in 
> {{streams_application_upgrade_test.py}} and 
> {{{}streams_cooperative_rebalance_upgrade_test.py{}}}.
> Failed run:
>  * [https://github.com/opensource4you/clip/actions/runs/47053782305]
>  * [https://github.com/opensource4you/clip/actions/runs/47457632840]
> The proposed fix overrides {{Service.clean()}} in {{StreamsTestBaseService}} 
> so teardown always removes {{{}/mnt/streams{}}}. {{CLEAN_NODE_ENABLED}} still 
> controls the cleanup inside {{{}start(){}}}, because ducktape's 
> {{Service.start()}} calls {{clean_node()}} directly while teardown goes 
> through {{{}Service.clean(){}}}. ducktape copies the service logs before it 
> cleans the services, so no logs are lost.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to