Skip to content
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

Convert unwraps to ? and improve logging #2695

Open
YJDoc2 opened this issue Feb 19, 2024 · 3 comments
Open

Convert unwraps to ? and improve logging #2695

YJDoc2 opened this issue Feb 19, 2024 · 3 comments
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@YJDoc2
Copy link
Collaborator

YJDoc2 commented Feb 19, 2024

Right now, after a certain point in the init process, the logs do not get forwarded to systemd/journalctl as we change the root mount. After that point we don't send the error back via the main sender to the main process either, so we don't get any error logs. Thus, if the init process fails due to any reason, we only get Error waiting for init ready, pipe broken as the log, which makes it hard to debug.

Also, there are several places where we have called unwrap on results, due to which the process panics, and as a result the errors are not propagated correctly. I think a better way here is to let the error propagate up by using ? , so that users of our library (in our case youki) can handle them as they want, which is a better practice for libraries.

@YJDoc2 YJDoc2 added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 19, 2024
@YJDoc2 YJDoc2 self-assigned this Feb 19, 2024
@YJDoc2
Copy link
Collaborator Author

YJDoc2 commented Feb 19, 2024

@utam0k @jprendes May I ask you to take a look at above, and let me know if you have any suggestions, comments or concerns in this? I will work on this accordingly. Thanks!

@utam0k
Copy link
Member

utam0k commented Feb 20, 2024

Good idea. Let's move on to the next step. How about establishing the procedure that produces this error message for starters?

@utam0k
Copy link
Member

utam0k commented Feb 24, 2024

#2705 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

2 participants