-
Notifications
You must be signed in to change notification settings - Fork 134
nitro: Reorganize and document modules #520
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
Open
tylerfanelli
wants to merge
15
commits into
containers:main
Choose a base branch
from
tylerfanelli:nitro-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,123
−689
Conversation
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
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Modularize each error within its respected module. This allows for clearer messages to determine the component that the error originated. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Creating the enclave VM can be thought of as a critical section that should not be interrupted. Disable all signals while starting the enclave VM. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
If an error occurs in device proxy threads, ensure they are logged. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
There exists shared behavior within the device proxies such as dedicated threads for reading from and (optionally) writing to a vsock, signalling when the proxy has shut down, and more. Extract this shared behavior from the individual device proxy implementations themselves and implement them within the proxy list's method for running each proxy. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Refer to the port offset directly when creating the proxy's vsock. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
The proxy threads do not return until they are finished running. Reflect this by naming the method `run` instead of `start` which may indicate returning after starting the proxies. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Rather than direct device emulation, the proxies act as intermediaries between the guest and host device to provide device services. `device` may lead some to believe that the module refers to device emulations. Rename it to `proxy` to better reflect its/their goals. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Originally, the enclave's main process would sleep to give libkrun a chance to read the return code before the enclave shut down. Rather than sleep, write a 4-byte "close signal" to the enclave to notify it that libkrun has read the return code and the enclave can now exit. Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
bbbcbe4 to
bcedd53
Compare
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
bcedd53 to
b37a470
Compare
| .map_err(Error::UnixWrite)?; | ||
| } else { | ||
| tx.send(()).unwrap(); | ||
| let _ = tx.send(()); |
Member
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.
Any particular reason why we want to ignore the error here?
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
Signed-off-by: Tyler Fanelli <tfanelli@redhat.com>
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.
cc/ @jakecorrenti