8000 Fix tmpstorage teardown by nirs · Pull Request #355 · oVirt/vdsm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix tmpstorage teardown #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 21, 2022
Merged

Conversation

nirs
Copy link
Member
@nirs nirs commented Nov 18, 2022

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:

$ sudo dmsetup table
bae261e2--3bfb--473d--86df--a63f92375df7-ids: 0 262144 linear 7:0 526336
bae261e2--3bfb--473d--86df--a63f92375df7-inbox: 0 262144 linear 7:0 788480
bae261e2--3bfb--473d--86df--a63f92375df7-leases: 0 4194304 linear 7:0 1312768
bae261e2--3bfb--473d--86df--a63f92375df7-master: 0 2097152 linear 7:0 7604224
bae261e2--3bfb--473d--86df--a63f92375df7-metadata: 0 262144 linear 7:0 264192
bae261e2--3bfb--473d--86df--a63f92375df7-outbox: 0 262144 linear 7:0 1050624
bae261e2--3bfb--473d--86df--a63f92375df7-xleases: 0 2097152 linear 7:0 5507072
cs-root: 0 94453760 linear 252:2 2048
cs-swap: 0 8298496 linear 252:2 94455808

and the loop device is not detached:

$ losetup -a
/dev/loop0: []: (/var/tmp/vdsm/test_merge_with_bitmap0/backing-file-000)

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:

sudo ~/.venv/vdsm/bin/tox -e storage-root tests/storage/{lvm,blocksd}_test.py -- -v -m root

Signed-off-by: Nir Soffer nsoffer@redhat.com

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:

    $ sudo dmsetup table
    bae261e2--3bfb--473d--86df--a63f92375df7-ids: 0 262144 linear 7:0 526336
    bae261e2--3bfb--473d--86df--a63f92375df7-inbox: 0 262144 linear 7:0 788480
    bae261e2--3bfb--473d--86df--a63f92375df7-leases: 0 4194304 linear 7:0 1312768
    bae261e2--3bfb--473d--86df--a63f92375df7-master: 0 2097152 linear 7:0 7604224
    bae261e2--3bfb--473d--86df--a63f92375df7-metadata: 0 262144 linear 7:0 264192
    bae261e2--3bfb--473d--86df--a63f92375df7-outbox: 0 262144 linear 7:0 1050624
    bae261e2--3bfb--473d--86df--a63f92375df7-xleases: 0 2097152 linear 7:0 5507072
    cs-root: 0 94453760 linear 252:2 2048
    cs-swap: 0 8298496 linear 252:2 94455808

and the loop device is not detached:

    $ losetup -a
    /dev/loop0: []: (/var/tmp/vdsm/test_merge_with_bitmap0/backing-file-000)

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:

    sudo ~/.venv/vdsm/bin/tox -e storage-root tests/storage/{lvm,blocksd}_test.py -- -v -m root

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
@nirs nirs force-pushed the fix-tmpstorage-teardown branch from cbf41d9 to 8554f7f Compare November 18, 2022 23:58
@aesteve-rh aesteve-rh added storage tests Issues related to automated tests labels Nov 21, 2022
Copy link
Member
@aesteve-rh aesteve-rh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I did notice it in my runs, but I was focused on the bug and didn't investigate this issue further. I was periodically rebooting the VM when it run out of space while testing...

@mz-pdm mz-pdm merged commit 7eb28ea into oVirt:master Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
storage tests Issues related to automated tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0