You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a smoke test for Crucible VCR replacement:
- Add a `CrucibleDisk` function to get a disk's current VCR.
- Add a `TestVm` framework to send a VCR replacement request.
- Fix a couple of bugs in Crucible disk setup:
- The `id` field in the VCR's `CrucibleOpts` needs to be the same in
the old and new VCRs, so use the disk ID for it instead of
calling `Uuid::new_v4()` every time the VCR is generated.
- When using a `Blank` disk source, properly account for the fact
that the disk source size is given in bytes, not gibibytes.
Also add a couple of bells and whistles to allow this test to be
transformed into a test of VCR replacement during VM startup:
- Make PHD's `VmSpec` type a public type and amend `Framework` to allow
tests to create a VM from a spec. This gives tests a way to access
a config's Crucible disks before actually launching a VM (and sending
an instance spec to Propolis).
- Reorganize the `CrucibleDisk` types to wrap the disk innards in a
`Mutex`, allowing them to be mutated through the `Arc` references that
tests get. This will eventually be used to allow tests to override the
downstairs addresses in a disk's VCRs before launching a VM that uses
that disk, which will be used to test #841. In the meantime, use the
mutex to protect the VCR generation number, which no longer needs to
be an `AtomicU64`.
0 commit comments