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

[CLI] Qemu error on long unix socket path while using kraft run #1576

Open
Guikingone opened this issue Apr 18, 2024 · 4 comments
Open

[CLI] Qemu error on long unix socket path while using kraft run #1576

Guikingone opened this issue Apr 18, 2024 · 4 comments
Assignees
Labels
kind/bug Something isn't working priority/none Nice to have issues/features that do not have requests/complaints right now.

Comments

@Guikingone
Copy link

Guikingone commented Apr 18, 2024

Describe the bug

Hi πŸ‘‹πŸ»

When using the kraft run command locally, it seems that when the Qemu path generated can trigger an error if the path is longer than 104 bytes:

⚑➜ http-php8.2 (ξœ₯ main) kraft run -p 8080:80 unikraft.org/nginx:latest
 W  using hardware emulation
[?] multiple runnable contexts discovered: how would you like to proceed? run the cwd's Kraftfile and use 'unikraft.org/nginx:latest' as arg(s)
 i  use --as=kraftfile-runtime to skip this prompt in the future
[+] building rootfs... done!                                                                                                                                                                                                 x86_64 [0.8s]
 E  could not start and wait for QEMU process: qemu-system-x86_64: -qmp unix:/Users/__USERNAME__/.local/share/kraftkit/runtime/37a7691a-d402-4760-b493-692bb8d0460a/qemu_control.sock,server,nowait: UNIX socket path '/Users/__USERNAME__/.local/share/kraftkit/runtime/37a7691a-d402-4760-b493-692bb8d0460a/qemu_control.sock' is too long
Path must be less than 104 bytes
exit status 1

The hardware emulation is found and the process seems to be ready to launch but Qemu seems to don't like too long path, is there any way to change the maximum bytes allowed in the path of maybe change the path where the socket is created?

Thanks again for the help and have a great day πŸ™‚

PS: For more informations, I'm on mac M1 chip.

Steps to reproduce

  • Install the Kraft CLI
  • Run kraft run -p 8080:80 unikraft.org/nginx:latest

Expected behavior

No response

Which architectures were you using or does this bug affect?

arm64

Which operating system were you using or does this bug affect?

macOS

Relevant log output

Didn't found any way to obtain more logs even with `--log-level`.
@Guikingone Guikingone added the kind/bug Something isn't working label Apr 18, 2024
@Guikingone Guikingone changed the title [CLI] Qemu error on long unix socket path [CLI] Qemu error on long unix socket path while using kraft run Apr 18, 2024
@nderjung
Copy link
Member

nderjung commented Apr 18, 2024

Hey @Guikingone, thanks for the report. This is not a fun error, because the best we can do here is shorten one of the intermediate directories (the UUID) to the machine name.

For now, a temporary mitigation for you is to update the runtime_dir in the KraftKit config file (located at ~/.config/kraftkit/config.yaml) to something shorter, e.g. /Users/__USERNAME__/.kraftkit/).

I'll contact the QEMU folks to see if this issue has been solved in a newer version or whether it's still an issue that can be resolved. I know they're busy preparing v9 at the moment.

@nderjung
Copy link
Member

I have opened up an issue on QEMU's issue tracker: https://gitlab.com/qemu-project/qemu/-/issues/2292

@Guikingone
Copy link
Author

Hi @nderjung πŸ‘‹πŸ»

Thanks for the fast feedback, updating the path seems to allow to launch the machines, I'm facing some issues regarding the platform but it resolve the main issue here, thanks πŸ™‚

@nderjung
Copy link
Member

@Guikingone no problem. There are some replies with more information on the QEMU issue; looks like it's OS specific. Maximum is roughly 108 characters.

One of the things we're contemplating is changing the runtime_dir to something like /var/lib/unikraft/; but this would require updating install scripts, documentation, permission checks, etc.

@craciunoiuc craciunoiuc added the priority/none Nice to have issues/features that do not have requests/complaints right now. label Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working priority/none Nice to have issues/features that do not have requests/complaints right now.
Projects
None yet
Development

No branches or pull requests

3 participants