{{ message }}
vmm: api: Be more specific on "Still pending remove vcpu" errors#7043
Merged
likebreath merged 3 commits intocloud-hypervisor:mainfrom Apr 28, 2025
Conversation
651baaf to
aa7ba76
Compare
likebreath
reviewed
Apr 25, 2025
Member
likebreath
left a comment
There was a problem hiding this comment.
@fidencio Thank you for the contribution. Good to have you back in the community. Some comments below.
Member
There was a problem hiding this comment.
Nit: can you please keep the alphabetical order, say after VmAddNet?
As the coming patches in this series will take advantage of a status code that was recently added there. Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
Although the CPU manager gives us a quite descriptive error, on the application side (the part calling Cloud Hypervisor) we have absolutely no way to distinguish such error from any other error that may happen when resizing a VM. With this in mind, let's be more specific and return a TooManyRequests (429) error, allowing the caller to have a chance to decide whether they want to retry the operation or not. https://datatracker.ietf.org/doc/html/rfc6585#section-4 Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
In order to be on-pair with what's we're using from micro-http, let's also add the proper status code here as well (as it will be used by `ch-remote`). Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
aa7ba76 to
6ed7e46
Compare
Member
Author
likebreath
approved these changes
Apr 28, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Although the CPU manager gives us a quite descriptive error, on the application side (the part calling Cloud Hypervisor) we have absolutely no way to distinguish such error from any other error that may happen when resizing a VM.
With this in mind, let's be more specific and return a
TooManyRequests(429) error, allowing the caller to have a chance to decide whether they want to retry the operation or not.Note: We're bumping micro-http as the
TooManyRequestsstatus code had to be added there first.https://datatracker.ietf.org/doc/html/rfc6585#section-4