feat: add Hermit unikernel backend support#540
feat: add Hermit unikernel backend support#540jim-junior wants to merge 1 commit intourunc-dev:mainfrom
Conversation
✅ Deploy Preview for urunc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
IrvingMg
left a comment
There was a problem hiding this comment.
Thanks! Would it be possible to add at least some basic test cases for this?
|
Alright @IrvingMg , let me update the PR basing on your feedback |
|
Hello @jim-junior , thank you a lot for this PR. I have tested it locally with your image and it worked. Well done! As @IrvingMg suggested, it would be useful to add at least one end-to-end test. Furthermore, it would also be usefule to document the current support for hermit-rs, in a similar way as with other guests. (Mewz for example 09ec31b). There is no need for long text, just:
|
|
Hello @cmainas , I have added the end-to-end test and other recommendations from @IrvingMg . For now I have added one test using the
Concerning this, its the default behavior of hermit unikernels, I haven't honestly ever tried to disable the logs, but i will try to do some research is its possible to reduce the logs, in case i find something, i will drop the solution into the Lastly concerning the documentation, I am requesting I work on them it a separate PR. I promise to start on it immediately after this PR is done. |
cmainas
left a comment
There was a problem hiding this comment.
Hello @jim-junior ,
I looked in more details the PR and I have added a few comments in the code. Furthermore, some more generic comments:
- It seems the changes for Qemu have not been reverted. I understand though why the linter does not like these lines, but it is quite weird that the linter in our CI did not complain about it in the past.
- Unfortunately, the seccompTest does not test the functionality of the guest, but the monitor's. Therefore, it would be better to use the matchTest (e.g. https://github.com/urunc-dev/urunc/blob/main/tests/e2e/test_cases.go#L34). Also, since it is a matchTest, it would be better to be placed under str tests. The nerdctl tests are already too many. Also can you use this image instead
harbor.nbfc.io/nubificus/urunc/hello-workd-qemu-hermit-initrd:latest. It is the same as yours, but for security reasons, we should not rely on images that can change in the future.
Some general notes for future work:
- This PR does not add support for virtiofs which hermit-rs seems to support.
|
Alright @cmainas , let me update the PR basing on your comments. |
|
@cmainas , I have updated the PR basing on your feedback. |
|
hello @cmainas , some tests are failing, one of them seems to be concerning the image name, Furthermore, the one of the Maybe whats failing because of my is the linting of commit messages, I committed a long message that doesn't align with commit conventions, I think i will have to edit or revert and recommit. As for the others, you can advise how i can handle them |
|
Hello @jim-junior ,
That is my fault. I have tagged the image with
Feel free to ignore these failures. They happen due to slow image pulling. I manually check them and will re-run the test if the reason is during the image pulling.
Yeah, just follow the guidelines for the commit message and everything should be ok. Also do not forget to add yourself here Regarding the documentation, overall it is not a good practice to add a new feature without testing and documentation. There are already some parts of our documentation that need to get refined and unfortunately, we do not have enough maintainers to focus entirely on documentation. Therefore, we want to be quite strict with new features and keeping the documentation up to date, Also, we have experienced quite a lot of drive-by PRs and it is not very easy to trust new contributors for follow up PRs. |
|
Hi @jim-junior, could you please mark review comments as resolved once they’re addressed? That makes it easier to track what’s left. Thanks! |
Okay noted. I will add the documentation withing this PR too |
Alright, I will be marking them as resolved once addressed. My bad |
- Added Hermit unikernel backend (QEMU x86_64, initrd-based boot) - Enabled basic networking support via virtio-net tap - Added Hermit unikernel test cases to e2e suite - Updated documentation and contributor list Fixes: urunc-dev#97 Signed-off-by: jim-junior <jimjunior854@gmail.com>
93c734e to
c90d0a7
Compare
|
Hello @cmainas , I've updated the PR, fixed the commits with a rebase, added my details to the |
Description
This PR adds initial support for the Hermit unikernel backend in urunc.
The implementation introduces a new unikernel type (Hermit) that integrates Hermit-based applications with the urunc runtime and QEMU as the underlying VM monitor. It also uses
Initrdfor storage and currently supports and is only tested onx86arch.Related issues
How was this tested?
LLM usage
N/A
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).