oxidecomputer / crucible

A storage service.
Mozilla Public License 2.0
175 stars 18 forks source link

Make crutest know extent info for each sub volume. #1474

Closed leftwo closed 1 month ago

leftwo commented 1 month ago

Updates for crutest to know more about the sub-volumes.

Replaced BlockIO query_extent_size() with query_extent_info(). This now returns a Vec instead of a Block.

ExtentInfo is:

    pub extent_size: Block,
    pub extent_count: u32,

Having this query will enable more test coverage, and allow at test to know the configuration of all the sub_volumes that make up a volume.

Added a function to VolumeConstructionRequest to copy out all the targets for all the sub-volumes.

Crutest updates: Use the new query_extent_info() to build a RegionInfo struct that captures each of the sub_volumes info.

New "pleasant summary" output for RegionInfo that shows all the information from all sub-volumes.:

----------------------------------------------
random write with 4 KiB chunks (1 block)
region info:
  block size:                   4096 bytes
  sub_volume 0 blocks / extent: 100
  sub_volume 0 extent size:     400 KiB
  sub_volume 0 extent count:    15
  sub_volume 1 blocks / extent: 100
  sub_volume 1 extent size:     400 KiB
  sub_volume 1 extent count:    15
  sub_volume 2 blocks / extent: 100
  sub_volume 2 extent size:     400 KiB
  sub_volume 2 extent count:    15
  total blocks:                 4500
  total size:                   17.6 MiB
  encryption:                   no
----------------------------------------------

Use the new pleasant summary output elsewhere in crutest. Updated sparse_fill_workload to handle multiple sub-volumes.
Updated span_workload to operate on each sub-volume. Updated crutest tests ReplaceBeforeActive and ReplaceReconcile to use the global dsc option and not require their own unique option.

Add FillSparse command to crutest cli

Updated test_replace_special.sh to use dsc instead of targets. Updated test_live_repair.sh to use dsc instead of targets. Updated most of test_up.sh to use dsc instead of targets, though there are a few places where we are not free of them yet. Also hammer test will need updates to support dsc instead of targets.

leftwo commented 1 month ago

Okay, so after some side band discussions, I'm tabling this work in favor of another route to the same outcome.

Instead of leaking more details about the underlying structure of things through BlockIO, it makes better sense to just make crutest commit to Volume. Then, volume details (sub-volume, extent counts, extent sizes) can be specific Volume things.

I'm moving this back to WIP, but will probalby discard it after I've taken pieces into another PR where I'll end up at the same place, but with a different path to get there.

leftwo commented 1 month ago

This work was scattered across a few other PRs, but the largest part ended up here: https://github.com/oxidecomputer/crucible/pull/1508

I'm closing this one now, as 1508 takes its place. Comments and suggestions that were not applied elsewhere and still were relevant were taken over in 1508