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

fix: Small fixes resolving naming and nil-pointers #1552

Merged

Conversation

nderjung
Copy link
Member

@nderjung nderjung commented Apr 17, 2024

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran make fmt on your commit series before opening this PR;
  • Updated relevant documentation.

Description of changes

GitHub-Fixes: #1551

@nderjung nderjung requested a review from LucaSeri April 17, 2024 08:06
@nderjung nderjung force-pushed the nderjung/fix/runtime/rename-and-nil-ptr branch from bbcdd5f to 0da37c6 Compare April 17, 2024 08:10
Copy link
Contributor

@LucaSeri LucaSeri left a comment

Choose a reason for hiding this comment

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

Hi @nderjung. Thanks for this. kraft pkg works as expected now.
One question about the runtime flag: is the following setup meant to work?

Kraftfile
spec: v0.6

rootfs: ./Dockerfile
  
cmd: ["/server"]

then:

kraft run --runtime unikraft.org/base:latest .

I get the following errors:

 E  could not determine how to run provided input: first positional argument is a directory: .
first positional argument is a directory: /home/kero/unikraft-work/catalog/examples/http-go1.21
cannot run project build without unikraft
cannot run project without runtime directive
arguments represent a file or directory
arguments represent a file or directory

Perhaps the runtime flag should also be injected elsewhere?

This makes it consistent with how it is presented externally, i.e.
via the `runtime` element in the `Kraftfile`.

Signed-off-by: Alexander Jung <alex@unikraft.io>
GitHub-Fixes: unikraft#1551
Signed-off-by: Alexander Jung <alex@unikraft.io>
@nderjung nderjung force-pushed the nderjung/fix/runtime/rename-and-nil-ptr branch 2 times, most recently from 973d0eb to 62bb264 Compare April 17, 2024 10:32
The `--runtime` flag for `kraft run` was implicitly registered by
the `runtime` package.  In this commit we remove this implicit
registration and declare it properly as `RunOptions` attribute.
As a result, we explicitly use it also in relevant runners which
employ a runtime name.

Signed-off-by: Alexander Jung <alex@unikraft.io>
@nderjung nderjung force-pushed the nderjung/fix/runtime/rename-and-nil-ptr branch from 62bb264 to 2f326fa Compare April 17, 2024 10:33
@nderjung
Copy link
Member Author

Thanks @LucaSeri, I've broken up the commits to be a bit more explicit about the (re)introduction of the --runtime flag. Additionally, I've addressed the issue that surrounds not having a runtime element in a Kraftfile as this flag was not properly used in the respective runner.

@nderjung nderjung requested a review from LucaSeri April 17, 2024 10:35
Copy link
Contributor

@LucaSeri LucaSeri left a comment

Choose a reason for hiding this comment

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

Thanks! Works well.

@LucaSeri LucaSeri merged commit 6b34cc9 into unikraft:staging Apr 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nil pointer panic when running kraft pkg
2 participants