The latest Firecracker version merged a brand new hybrid implementation of vsock, which comes with some special constraints compared to the regular vhost-vsock version.
Here are the steps which needs to be addressed in order to reach the proper implementation:
swaggerfc.go to build with the new APIUseVsock being a boolean into an actual choice about the type of socket connection being used. Ideally, we should have something like: unix, vsock, vsock-hybrid. Along with this change, we need to introduce a new type kataVSockHybrid that will have different fields than kataVSOCK, and in particular a path to the socket that needs to be chosen by Kata runtime as it needs to be unique across multiple instances.kata_agent.go to implement the case where vsock-hybrid is picked up. This means it's not needed to rely on /dev/vhost-vsock in this case to retrieve an appropriate CID.fc.go to rely on the path decided earlier in the code, and use it as UdsPath. No need to close the vhostFd since there will be no vhostFd in this case.kata_agent.go returns an URL with vsock-hybrid:// instead of vsock://, we need to update kata-containers/agent/protocols/client/client.go, function NewAgentClient() to handle the case of a third possibility. This client wrapper should handle both unix, vsock and vsock-hybrid. In details, the hybrid version needs to be handled by sending a special message right after the connection to the unix socket.kata-proxy and kata-shim should not need to be modified since they will receive a URL that they will use through the client wrapper code directly. For this reason, both kata-proxy and kata-shim should simply need an update of the vendored version from the kata-containers/agent repository.The agent code doesn't require any change since the guest still sees an AF_VSOCK socket.
/cc @egernst @devimc
Hi guys
I've been working on kata+firecracker on aarch64, v0.18 is the optimal version.
Have you guys planned a schedule for this new vsock design, in this month, or next month? ;) 馃槝
really looking forward it~~~
@devimc @egernst @sboeuf @gnawux @bergwolf @xiaobo55x
@Pennyzct yes, I'm working on that, I hope to have it working this week
@devimc thanks~
Most helpful comment
@Pennyzct yes, I'm working on that, I hope to have it working this week