-
Notifications
You must be signed in to change notification settings - Fork 50
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
Refactoring around daemon launch #389
Conversation
There was a mix of just unwrapping (panicking) and catching and logging errors. The unwrapping is not allowing for particulary pretty error handling, so let's bubble the errors up by not crashing the thread, but by just returning a Result<()> than is received when joining the threads. Not all .unwrap() uses were translated since a followup PR (rust-vmm#389) will rework that code anyway (and get rid of the .unwrap() in the process). Signed-off-by: Erik Schilling <[email protected]>
There was a mix of just unwrapping (panicking) and catching and logging errors. The unwrapping is not allowing for particulary pretty error handling, so let's bubble the errors up by not crashing the thread, but by just returning a Result<()> than is received when joining the threads. Not all .unwrap() uses were translated since a followup PR (rust-vmm#389) will rework that code anyway (and get rid of the .unwrap() in the process). Signed-off-by: Erik Schilling <[email protected]>
There was a mix of just unwrapping (panicking) and catching and logging errors. The unwrapping is not allowing for particulary pretty error handling, so let's bubble the errors up by not crashing the thread, but by just returning a Result<()> than is received when joining the threads. Not all .unwrap() uses were translated since a followup PR (rust-vmm#389) will rework that code anyway (and get rid of the .unwrap() in the process). Signed-off-by: Erik Schilling <[email protected]>
There was a mix of just unwrapping (panicking) and catching and logging errors. The unwrapping is not allowing for particulary pretty error handling, so let's bubble the errors up by not crashing the thread, but by just returning a Result<()> than is received when joining the threads. Not all .unwrap() uses were translated since a followup PR (#389) will rework that code anyway (and get rid of the .unwrap() in the process). Signed-off-by: Erik Schilling <[email protected]>
Changelog
|
The dependencies for this landed now. Shall we do a new release of the |
I'd suggest rebasing it, keep the git snapshot (referring to the In the end, I'd merge it only after releasing |
ACK. Though, since it would need an update to drop the git dependency reference anyway, I think I will just wait for the release to happen and then rebase this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mostly reviewed sound and vsock since I know them better, but overall LGTM!
I left a minor comment and a question that eventually should be fixed in another PR.
Changelog
|
The CI is complaining about |
Changelog:
|
This become available with the recent vhost-user-backend [1] updates and allows to get rid of some boilerplate code. [1] rust-vmm/vhost#173 Signed-off-by: Erik Schilling <[email protected]>
The error from joining a thread is a bit confusing. It is only printed if the other thread panicked. This means, effectively, we only get here if something called .unwrap(), .expect() or panicked in a different way. In these cases an (ugly) error was already printend. Printing a pretty message about the join failure does not really help a lot... So let's just continue the unwind as suggested by the docs on the join `Result` [1]. Before: thread '<unnamed>' panicked at 'Test panic', crates/gpio/src/backend.rs:146:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Any { .. }', crates/gpio/src/backend.rs:176:23 After: thread '<unnamed>' panicked at 'Test panic', crates/gpio/src/backend.rs:146:13 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace [1]: https://doc.rust-lang.org/std/thread/type.Result.html Signed-off-by: Erik Schilling <[email protected]>
rebased in the hope that recent updates fixed the yanked cc |
Finally the redundant code is removed. Yay :) |
Summary of the PR
Depends on rust-vmm/vhost#173This cleans up a couple of error reporting related issues and introduces use
of the proposed
serve
API [1].[1] rust-vmm/vhost#173
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.