Fix tmpstorage teardown #355
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since we moved to lvm devices, tmpstorage teardown is broken, and does not deactivate and remove vgs during teardown. After running a test creating a temporary loop device and creating a storage domain, the storage domain lvs are left active:
and the loop device is not detached:
and the backing-file data is not deleted when deleting the backing file. This quickly leads to filling the disk on the host running the tests.
The issue is using a lvm filter in tmpstorage; when using lvm devices, the lvm filter is ignored, we don't find any vg, so we don't clean up the lvm resources.
Fix by dropping the lvm config, and using --devices with all the devices added to tmpstorage.
Tested by running lvm and blocksd tests on centos stream 8 host:
Signed-off-by: Nir Soffer nsoffer@redhat.com