Basic Rebuilding test
- Create and attach a volume.
- Write a large amount of data to the volume.
- Disable disk scheduling and the node scheduling for one replica.
- Crash the replica progress. Verify
- the corresponding replica will become ERROR.
- the volume will keep robustness Degraded.
- Enable the disk scheduling. Verify nothing changes.
- Enable the node scheduling. Verify.
- the failed replica is reused by Longhorn.
- the rebuilding progress in UI page looks good.
- the data content is correct after rebuilding.
- volume r/w works fine.
- Direct delete one replica via UI. Verify
- a new replica will be replenished immediately.
- the rebuilding progress in UI page looks good.
- the data content is correct after rebuilding.
- volume r/w works fine.
Auto balancing of replica rebuilding
Related issue:
https://github.com/longhorn/longhorn/issues/4105
Given Setting “replica-soft-anti-affinity” is “false”
And Setting “replica-auto-balance-disk-pressure-percentage” is “80”
And Disable node scheduling on 2 nodes. let’s say node-2 & node-3
And Create multiple volumes to reach disk space percentage more 50%
When Enable node scheduling on node-2
Then Replica should rebuilt on node-2 to reduce the pressure on node-1
When Setting “replica-auto-balance-disk-pressure-percentage” is “40”
And Enable node scheduling on node-3
Then Replica should rebuilt on node-3
When Replica rebuilding is in progress, kill the replica process
Then Replica should be failed and a new replica rebuilding should get trigger
And No orphaned data should be leftover on the disk