Skip to content

[DRAFT] test(vhost-user-blk): add test for device resize #4249

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

Closed
wants to merge 9 commits into from

Conversation

kalyazin
Copy link
Contributor

This depends on:

Changes

Add a test to verify disk resize support in vhost-user-blk.

Reason

We need to test disk resize support in vhost-user-blk.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • API changes follow the Runbook for Firecracker API changes.
  • User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • New TODOs link to an issue.
  • Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

kalyazin and others added 9 commits November 17, 2023 18:01
This removes 256 byte offest when requesting config
from backend. There is no apparent reason why
we should add the offset.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
Unfortunately this change cannot be split into
multiple commits due to high level of entanglement
of the changes.

Reason for the change: the Qemu backend uses direct IO
when working with the disk file which makes it
scale very poorly.  That results in intermittent
test failures, because our functional integration tests
run in parallel, and our ssh connection timeouts
expire if the microVM does not boot in time.

Switching from the Qemu to crosvm backend comes with
the challenge that crosvm locks the disk file exclusively
when opening it as rw (which makes sense).  We have
to make copies of the disk files before we give
them to crosvm if we don't configure crosvm as readonly.

One of the ripples of the above is an existing race
condition in the partuuid_and_disk_path_host fixture
over the disk file kicks in.  We are removing this
fixture altogether because now we use per microVM
copies of the disks.

Finally, this change explicitly configures
performance tests to switch to the Qemu backend
to preserve the status quo.  We may switch them
to the crosvm backend too at a later stage.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
Updated logic to serve interrupt status to the guest.
Now vhost-user devices can serve config updates irqs
to the guest.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Added new method `config_update` that will
fetch new config from the backend and notify
guest about the config change.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Now we can trigger vhost-user-block device config update.
This is done by issuing the same `PATCH` command to the
`/drive` API endpoint without specifing any virtio-block
specific parameters.

Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
This is to allow requesting and receiving
vhost-user-blk device config in response
to a PATCH API request.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
This is to allow PATCH /drives without
optional arguments.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
This is to allow PATCH /drives for vhost-usr-blk.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
The test issues a PATCH /drives request
to a vhost-user-blk drive and expects for the guest
to observe the new device size.

Signed-off-by: Nikita Kalyazin <kalyazin@amazon.com>
@kalyazin
Copy link
Contributor Author

this was superseded by #4223 .

@kalyazin kalyazin closed this Apr 29, 2024
@kalyazin kalyazin deleted the vub_resize_test branch April 29, 2024 12:22
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.

2 participants