Skip to content

Commit 811a606

Browse files
committed
feat(firecracker): launch with control socket instead of config file
Firecracker currently boots via --no-api --config-file, which disables its control socket entirely. Switch to --api-sock so the socket stays open and reachable after the guest starts, instead of driving everything through a static config file. Signed-off-by: Anamika AggarwaL <anamikaagg18@gmail.com>
1 parent 8928c4c commit 811a606

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/unikontainers/hypervisors/firecracker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ func (fc *Firecracker) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel
108108
// options in FC, since the string return value of the Monitor related
109109
// functions in the unikernel interface do not integrate well with FC's
110110
// json configuration.
111-
cmdString := fc.Path() + " --no-api --config-file "
111+
apiSockPath := filepath.Join("/tmp/", args.ContainerID+".sock")
112+
cmdString := fc.Path() + " --api-sock " + apiSockPath
112113
JSONConfigFile := filepath.Join("/tmp/", FCJsonFilename)
113-
cmdString += JSONConfigFile
114114
if !args.Seccomp {
115115
cmdString += " --no-seccomp"
116116
}

0 commit comments

Comments
 (0)