-
Notifications
You must be signed in to change notification settings - Fork 6
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
Devise a test to force failure to destroy one of several devices in a pool #232
Comments
I have an idea that involves setting up a target on a "linear" device-mapper device, and then reloading that device to "error", and watching the "pool destroy" command fail. (My example backing device for the device-mapper linear test device is /dev/vdb1, or 252:17, which is 16775168 sectors in size.)
At this point is where the error appears:
And, in this state, the stratis pool device stack disappears, because all I/O to the block device is failing, until you reload the table entry to its original "linear" setting:
...and you have to restart stratisd, to allow it to start the pool. |
We might want something that is less permanent than error...we can't tell that the original bz wasn't a transient problem. |
I can get it to fail with a dm-dust device. My test virtual machine has a test device /dev/vdb1 which is 16775168 sectors in size. Assuming that a key has been created in key description "testkey":
And there are some errors from the kernel, since there was a buffered I/O error on "logical block 0" of the device. I had to add more than just 1 write failure, in order to get the pool destroy to fail. I think it was more than 4; 16 seemed to work. (With dm-dust, using the default of "0 write failures" for a bad block, a write would allow subsequent reads to succeed, but in this case, we want to fail the write for a limited number of times, but not all the time.) |
After this failure, we would expect to still see the pool when listing pools in the CLI at this time (we plan to fix that). We shouldn't see the pool stack, though, as stratisd should have destroyed all the upper layers. |
Confirmed; in this state, I can still see the pool when entering "stratis pool list", but I don't see the device stack. However, I do see the LUKS superblocks on the device /dev/mapper/dust1. (One of them is sector 0, which is what I set to fail, so perhaps it wasn't able to wipe the sectors at 0x0000 bytes and 0x4000 bytes.
If I restart stratisd, the pool will not appear in "stratis pool list". |
Good! |
@bgurney-rh Can you include this setup in your testing notebook when you get the chance? |
What we want to do is engineer a situation where when we instruct stratisd to destroy a pool, it fails to wipe the data from at least one, but not all, of the block devices that it owns. Any cause of this problem will do.
See https://bugzilla.redhat.com/show_bug.cgi?id=1908333 for the motivation.
The text was updated successfully, but these errors were encountered: