Add new test: remove snapshot chain
Add a test that uses a single VM to create
num_snapshots
live snapshots and then
remove them in the same order they were
created. That creates a volume chain
and forces the parent UUID of each
volume to be updated after each removal.
This tests is used to reproduce the bug in https://bugzilla.redhat.com/2103582
Stats for a succesful run with 10 snapshots and 2 iterations:
2022-07-25 11:47:09,828 INFO (run/main) Iteration 0 completed in 1117 seconds
2022-07-25 12:05:14,922 INFO (run/main) Iteration 1 completed in 1085 seconds
2022-07-25 12:05:14,969 INFO (run/main) Finished
2022-07-25 12:05:14,970 INFO (MainThread) 0 failed, 2 passed, 0 errored in 2202 seconds
Stats for unsuccesful run with 10 snapshots and 2 iterations:
2022-07-25 15:12:37,234 INFO (run/main) Iteration 0 completed in 671 seconds
2022-07-25 15:22:44,348 INFO (run/main) Iteration 1 completed in 607 seconds
2022-07-25 15:22:44,386 INFO (run/main) Finished
2022-07-25 15:22:44,386 INFO (MainThread) 2 failed, 0 passed, 0 errored in 1278 seconds
Once it fails, raises an error, and removes the vm early. That is why each itearion is faster on failing runs, with most of the time spent at creating the snapshots.
The error printed looks like:
JobError: Some jobs for with correlation id 2c9ab99d-e11a-4c02-8f70-31a68ec22026 have failed: [('Removing Snapshot Snapshot 2 of VM snapshot-test-vm-1', 'failed')]
Edited by Albert Esteve