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

Update unikernel with new build from builds.robur.coop #105

Open
wants to merge 24 commits into
base: main
Choose a base branch
from

Conversation

PizieDust
Copy link
Collaborator

@PizieDust PizieDust commented Jan 29, 2025

This PR is a continuation of the work started in #102 and is related to #54

In this PR, we :

  • download the binary from builds.robur.coop,
  • perform a manifest check to ensure that there's no changes in the bridge or block devices.
  • check that a binary exists from the latest build before attempting to download it
  • check if the vm should be compressed or not
  • modify or update the args passed in the config to albatross
    if everything checks out, then we pass this binary to albatross to perform the update.

@PizieDust PizieDust added the enhancement New feature or request label Jan 29, 2025
@PizieDust PizieDust requested a review from hannesm January 29, 2025 12:55
@PizieDust PizieDust self-assigned this Jan 29, 2025
albatross.ml Outdated Show resolved Hide resolved
unikernel.ml Outdated Show resolved Hide resolved
unikernel.ml Outdated Show resolved Hide resolved
@PizieDust PizieDust requested a review from reynir January 31, 2025 05:57
Copy link
Contributor

@reynir reynir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks fine. I have not tried to review the javascript changes, and I may be missing context.

Comment on lines +122 to +174
match
(req_only_bridges, mft_only_bridges, req_only_blocks, mft_only_blocks)
with
| [], [], [], [] -> Ok ()
| req_only_bridges, [], [], [] ->
Error
(`Msg
("Network devices missing from manifest: "
^ String.concat "," req_only_bridges))
| [], mft_only_bridges, [], [] ->
Error
(`Msg
("Network devices only in manifest: "
^ String.concat "," mft_only_bridges))
| [], [], req_only_blocks, [] ->
Error
(`Msg
("Block devices missing from manifest: "
^ String.concat "," req_only_blocks))
| [], [], [], mft_only_blocks ->
Error
(`Msg
("Block devices only in manifest: "
^ String.concat "," mft_only_blocks))
| req_only_bridges, req_only_blocks, [], [] ->
Error
(`Msg
("Network devices missing from manifest: "
^ String.concat "," req_only_bridges
^ " and block devices missing from manifest: "
^ String.concat "," req_only_blocks))
| [], req_only_blocks, mft_only_bridges, [] ->
Error
(`Msg
("Network devices only in manifest: "
^ String.concat "," mft_only_bridges
^ " and block devices missing from manifest: "
^ String.concat "," req_only_blocks))
| [], [], mft_only_blocks, req_only_bridges ->
Error
(`Msg
("Network devices missing from manifest: "
^ String.concat "," req_only_bridges
^ " and block devices only in manifest: "
^ String.concat "," mft_only_blocks))
| req_only_bridges, [], mft_only_blocks, [] ->
Error
(`Msg
("Network devices missing from manifest: "
^ String.concat "," req_only_bridges
^ " and block devices only in manifest: "
^ String.concat "," mft_only_blocks))
| req_only_bridges, req_only_blocks, mft_only_bridges, mft_only_blocks ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be refactored (e.g. "_ devices missing from manifest", "_ devices only in manifest"), that is, factor out the device type.

albatross.ml Outdated Show resolved Hide resolved
reynir and others added 2 commits January 31, 2025 16:54
While this is very inefficient it is only temporary until changes to ocaml-solo5-elftool are merged and released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants