Skip to content

Expose firecracker errors more clearly #128

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
samuelkarp opened this issue Mar 6, 2019 · 2 comments
Open

Expose firecracker errors more clearly #128

samuelkarp opened this issue Mar 6, 2019 · 2 comments
Labels
area/runtime base functionality Basic container functionality issue

Comments

@samuelkarp
Copy link
Contributor

Right now, if firecracker has an error, we show a pretty cryptic message like ctr: Put http://localhost/machine-config: dial unix /tmp/firecracker.sock: connect: no such file or directory: unknown. I've been using the following wrapper script around the firecracker binary to save its output and get a better handle at diagnosing what went wrong, but we need to do a better job of making this accessible.

workaround wrapper script
$ cat /usr/local/bin/firecracker-wrapper 
#!/bin/sh

exec > /tmp/firecracker.log
exec 2>&1

echo "Options: $@"

exec /usr/local/bin/firecracker "$@"
@samuelkarp samuelkarp added base functionality Basic container functionality issue area/runtime labels Mar 6, 2019
@kzys
Copy link
Contributor

kzys commented Jul 26, 2019

The Go SDK is able to bind stdout/stderr

https://github.com/firecracker-microvm/firecracker-go-sdk/blob/b704cc3feb1e827244ddbc8a25c55c482f7f6e36/command_builder.go#L103-L119

but we are not utilizing it so far.

cmd := firecracker.VMCommandBuilder{}.
WithBin(s.config.FirecrackerBinaryPath).
WithSocketPath(s.shimDir.FirecrackerSockPath()).
Build(s.shimCtx) // shimCtx so the VM process is only killed when the shim shuts down

@kzys
Copy link
Contributor

kzys commented Jul 26, 2019

Note that jailer support (#122) may change the way we invoke Firecracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime base functionality Basic container functionality issue
Projects
None yet
Development

No branches or pull requests

2 participants