-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Vhost user blk basic config change #4223
Merged
ShadowCurse
merged 8 commits into
firecracker-microvm:main
from
ShadowCurse:vhost_user_blk_basic_config_change
Nov 23, 2023
Merged
Vhost user blk basic config change #4223
ShadowCurse
merged 8 commits into
firecracker-microvm:main
from
ShadowCurse:vhost_user_blk_basic_config_change
Nov 23, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b432231
to
8ed6269
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4223 +/- ##
=======================================
Coverage 81.71% 81.72%
=======================================
Files 240 240
Lines 29239 29266 +27
=======================================
+ Hits 23893 23917 +24
- Misses 5346 5349 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
d64935c
to
0ec2fad
Compare
da72e7b
to
234163c
Compare
I gave it a manual test. It appears to work if I do 2 things:
|
7a0a436
to
4246a67
Compare
kalyazin
reviewed
Nov 17, 2023
4 tasks
9 tasks
88c361a
to
5bc7a4b
Compare
kalyazin
reviewed
Nov 22, 2023
d9ccfe4
to
b115336
Compare
5 tasks
a605fa7
to
44c7248
Compare
bchalios
previously approved these changes
Nov 23, 2023
44c7248
to
092e600
Compare
092e600
to
95b1209
Compare
kalyazin
reviewed
Nov 23, 2023
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>
b12a5a9
to
ed58a21
Compare
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 specifying any virtio-block specific parameters. Added tests to verify that any message is triggering the correct behaviour. Did minor change in the error message for block patching to make it more clear for the users. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Because now `vmm` thread can update vhost-user-block config it needs `sendmsg` and `recvmsg` to talk to the backend. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
This is to allow PATCH /drives for vhost-usr-blk. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk> Co-authored-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: Egor Lazarchuk <yegorlz@amazon.co.uk> Co-authored-by: Nikita Kalyazin <kalyazin@amazon.com>
Added `config_change_time_us` to the metrics for vhost-user devices. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Added `config_change_time_us` metric to the vhost-user-block device. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
ed58a21
to
7e12baa
Compare
bchalios
approved these changes
Nov 23, 2023
kalyazin
approved these changes
Nov 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Awaiting review
Indicates that a pull request is ready to be reviewed
Type: Enhancement
Indicates new feature requests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Updated
PATCH /drive
command to trigger config update for vhost-user-block devices if no parameters set.The config update includes reading new config from the backend and notifying the guest about the changes.
Also added new metric for vhos-user devices that measures time it took to read new config from the backend and
notify guest about it.
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
CHANGELOG.md
.TODO
s link to an issue.rust-vmm
.