@@ -20,6 +20,7 @@ Resource ../keywords/k8s.resource
2020Resource ../keywords/orphan.resource
2121Resource ../keywords/replica.resource
2222Resource ../keywords/engine_frontend.resource
23+ Resource ../keywords/io.resource
2324
2425Test Setup Set up v2 test environment
2526Test Teardown Cleanup test resources
@@ -396,3 +397,31 @@ Test V2 Instance Manager Pod Recreate Loop When Engine Frontend Recovery Blocks
396397 And Wait for volume test-vol healthy
397398 And Write data to volume test-vol
398399 Then Check volume test-vol data is intact
400+
401+ V2 Replica Migration Should Not Cause IO Stall
402+ [Documentation] issue: https://github.com/longhorn/longhorn/issues/13309
403+ ... Test steps:
404+ ... 1. Create v2 SC with dataLocality: best-effort, numberOfReplicas: 2
405+ ... 2. Create deployment using the volume, running an fsync writer logging per-write timing
406+ ... 3. Cordon volume attached node
407+ ... 4. Delete replica on volume attached node
408+ ... 5. Wait for volume healthy
409+ ... 6. Check no IO stall observed (max latency < 3 sec)
410+ IF '${DATA_ENGINE } ' == 'v1'
411+ Skip Test only validate on v2 data engine
412+ END
413+
414+ Given Create storageclass longhorn-test with
415+ ... dataEngine=v2
416+ ... dataLocality=best-effort
417+ ... numberOfReplicas=2
418+ And Create persistentvolumeclaim 0 volume_type=RWO sc_name=longhorn-test
419+ And Create deployment 0 with persistentvolumeclaim 0
420+ And Wait for volume of deployment 0 healthy
421+
422+ When Start fsync writer on deployment 0 and log per-write latency to lat.log
423+ And Cordon deployment 0 volume node
424+ Then Delete replica of deployment 0 volume on volume node
425+ And Wait for volume of deployment 0 attached and degraded
426+ And Wait for volume of deployment 0 healthy
427+ And Assert no IO stall from deployment 0 latency log lat.log
0 commit comments