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

make a flakey device #14

Open
akiradeveloper opened this issue Apr 20, 2014 · 2 comments
Open

make a flakey device #14

akiradeveloper opened this issue Apr 20, 2014 · 2 comments

Comments

@akiradeveloper
Copy link
Contributor

Hi Joe,

I tried to add new test having following scenario:

  1. create a wb device with devices carved out from tvm
  2. grab ruby, extract and configure it on it.
  3. remove the device
  4. recreate the wb device
  5. wrap one of the underlying devices by flakey with random (up, down)
  6. compile ruby
  7. fails at some moment
  8. remove the device
  9. repeat from 4

this test is to see wb device can terminate itself after IO error
without failure no matter where the IO error occured.

However, I couldn't make at the step 5.
The problem is that the device to wrap is carved out from tvm and
thus hides its implementation except its a linear device.
All we need to know to make a wrapped device in step 5
is that the offset and the name of underlying device of the device.

For example, in thin-provisioning/pool_resize_tests.rb
you makes a flakey device but you are using @metadata_dev not the metadata variable
knowing that the metadata is starting from LBA 0 of the @metadata_dev.

This is not a good code because it depends on the implicit information.
Actually, it should be able to write this code like this

table = Table.new(FlakeyTarget.new(dev_size(metadata.dev), metadata.dev, metadata.start, up_interval, 60))

where metadata.dev is the device under metadata.

There seems a workaround by parsing the table of the linear device to get the (dev, sector).
Should I work this way?

@akiradeveloper
Copy link
Contributor Author

Please advice me if you have time.
I have four consecutive holidays and thus can do some works.
I will try to write two tests (this is the one and the other is to test a unlikely cache-hit path).

@jthornber
Copy link
Owner

On 21 April 2014 00:14, Akira Hayakawa [email protected] wrote:

For example, in thin-provisioning/pool_resize_tests.rb
you makes a flakey device but you are using @metadata_dev not the metadata
variable
knowing that the metadata is starting from LBA 0 of the @metadata_dev.

I'm not really sure what the problem is here. You can wrap one of the
linear devices with a flakey device in exactly the same way as I did with
the @metadata_dev. There's no need for an offset unless you want to make a
specific sub region of the linear device flakey; in which case use another
tvm to carve up the linear.

  • Joe

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

No branches or pull requests

2 participants