Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
firecracker: Close the vsock vhostfd
Browse files Browse the repository at this point in the history
Unlike QEMU firecracker cannot accept a fd as part of the REST API.
Close the vsock vhostfd close to the point where we launch the VM.

Note: This is still racy.

Signed-off-by: Manohar Castelino <[email protected]>
  • Loading branch information
mcastelino committed Dec 20, 2018
1 parent 40e7fe9 commit 5c9e7a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions virtcontainers/fc.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ func (fc *firecracker) fcAddVsock(vs kataVSOCK) error {
if err != nil {
return err
}
//Still racy. There is no way to send an fd to the firecracker
//REST API. We could release this just before we start the instance
//but even that will not eliminate the race
vs.vhostFd.Close()
return nil
}

Expand Down

0 comments on commit 5c9e7a1

Please sign in to comment.