Skip to content
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

lvm2: Refactor udisks_daemon_util_lvm2_wipe_block() #1212

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

tbzatek
Copy link
Member

@tbzatek tbzatek commented Nov 10, 2023

Legacy code, most of the stuff is now offered by the current API.

Fixes #900

Copy link
Member

@vojtechtrefny vojtechtrefny left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Legacy code, most of the stuff is now offered by the current API.
Copy link

Cockpit tests failed for commit 4a73a1f. @martinpitt, @jelly, @mvollmer please check.

@martinpitt
Copy link
Contributor

The testTeardownRetry rawhide failure is worth retrying (/packit retest-failed or click on "Re-run" here). I think it's an unrelated bug.

@tbzatek
Copy link
Member Author

tbzatek commented Nov 13, 2023

The testTeardownRetry rawhide failure is worth retrying (/packit retest-failed or click on "Re-run" here). I think it's an unrelated bug.

Okay, let's see. It's great that to have this caught by the reverse tests!

RuntimeError: Timed out on 'set -e; [ -e /sys/module/scsi_debug ] || exit 0; for dev in $(ls /sys/bus/pseudo/drivers/scsi_debug/adapter*/host*/target*/*:*/block); do for s in /sys/block/*/slaves/${dev}*; do [ -e $s ] || break; d=/dev/$(dirname $(dirname ${s#/sys/block/})); umount $d || true; dmsetup remove --force $d || true; done; umount /dev/$dev 2>/dev/null || true; done; until rmmod scsi_debug; do sleep 0.2; done'

Would be interesting to dump the state of block devices after such failure. lsblk and perhaps even udisksctl dump to see if there's any mess hanging around.

@tbzatek
Copy link
Member Author

tbzatek commented Nov 13, 2023

/packit retest-failed

@martinpitt
Copy link
Contributor

@tbzatek That's actually our bug. The generic "after failure" cleanup (with the umount/dmsetup remove etc.) failed because

warning: umount: /mnt: target is busy.

So we have to make the test robust against that, so that the automatic retry has a chance of working. The initial failure was a timeout in the UI. I'll look into that in the next days, sorry for the trouble.

The cockpit test is green now, so not blocked by us (of course a lot of other tests are red)

@tbzatek
Copy link
Member Author

tbzatek commented Nov 13, 2023

The initial failure was a timeout in the UI. I'll look into that in the next days, sorry for the trouble.

Oh no worries, it's valuable to see how your testing framework works.

Let's merge this then and keep an eye on any related failures.

@tbzatek tbzatek merged commit 524dea5 into storaged-project:master Nov 13, 2023
12 of 18 checks passed
@martinpitt
Copy link
Contributor

Sent cockpit-project/cockpit#19605 to robustify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TODO: rewrite udisks_daemon_util_lvm2_wipe_block()
3 participants