Runtime: Firecracker only works in certain version

Created on 29 Nov 2019  Â·  10Comments  Â·  Source: kata-containers/runtime

Description of problem

If I use kata-static-1.9.2-x86_64.tar.xz or kata-static-1.8.5-x86_64.tar.xz and I run the Docker command _docker run -it --runtime=kata-fc ubuntu_ I get an error about vsock. The _vhost_vsock_ module is enabled using _modprobe_ and appears in _lsmod_.

The problem doesn't occur with kata-static-1.5.0-x86_64.tar.xz or kata-static-1.10.0-alpha1-x86_64.tar.xz, although 1.5.0 has memory allocation problems while running the container.

Expected result

I exected Kata to run the container.

Actual result

After executing the Docker command, I got this error:

> docker: Error response from daemon: OCI runtime create failed: [PUT /vsocks/{id}][400] putGuestVsockByIdBadRequest  &{FaultMessage:Invalid request method and/or path: PUT /vsocks/root}: unknown.
> ERRO[0017] error waiting for container: context canceled

By the way, this is the first time that I'm issuing a bug on GitHub, so maybe some details are missing in this report.

bug needs-review

All 10 comments

@maartenvdezz thanks for raising this, kata 1.9.x is only compatible with firecracker 0.18, for newer versions of firecracker you need to update kata to 1.10-alpha or master, sorry for inconvenience but firecracker changes its API in each release breaking backward compatibility

@devimc Thanks, I placed the Firecracker 0.18 binary in /opt/kata/bin/ and it worked indeed!

Is there a reason why an incompatible version of Firecracker is bundled with the 1.9.2 and 1.8.4 releases?

@maartenvdezz good question but not for me. @egernst @jcvenegas @amshinde any thoughts?

I think is a bug related on how fc is installed in static tarball and the new way the tarball is generated using github actions that is being tested in the last release cycle. Seems that is needed to add a way to handle the parameter that is used in the github action to let the fc installer script to use the currect kata branch/tag

https://github.com/kata-containers/packaging/blob/master/static-build/firecracker/build-static-firecracker.sh

@maartenvdezz Thanks for reporting. This looks like it could be a manifestation of a bug introduced in the new way we are handling releases using github actions:
https://github.com/kata-containers/packaging/issues/831

I have pushed a fix for the bug in 1.9 branch a few days back.

We will need to regenerate our tarballs for 1.9.2.
But I am not clear why you are seeing the same issue with 1.8.5. Can you confirm?
@jcvenegas I had generated this static tarball manually using our release scripts.

@amshinde look at this (default runtime is kata-fc):

âš¡ root@toulouse î‚° ~ î‚° tar xf kata-static-1.8.5-x86_64.tar.xz -C / âš¡ root@toulouse î‚° ~ î‚° /opt/kata/bin/firecracker -V firecracker 0.17.0 âš¡ root@toulouse î‚° ~ î‚° docker run ubuntu docker: Error response from daemon: OCI runtime create failed: [PUT /vsocks/{id}][400] putGuestVsockByIdBadRequest &{FaultMessage:Invalid request method and/or path: PUT /vsocks/root}: unknown. ERRO[0017] error waiting for container: context canceled

@maartenvdezz I have just updated the 1.9.2 release tarball to include firecracker 0.18.0 binary.
For 1.8.5, the supported version for firecracker is 0.17.0, so that isnt a packaging issue.
@devimc Any idea?

@maartenvdezz @amshinde are we building firecracker from source? that specific version must be compiled with --features vsock since the version released in the firecracker repository doesn't have it enabled

@maartenvdezz @devimc @amshinde can this be closed now?

@jcvenegas my problem is solved, but 1.8.5 (which I don't use now 1.9.2 works) still doesn't work I guess

Was this page helpful?
0 / 5 - 0 ratings