firecracker-microvm / firecracker-microvm/firecracker-go-sdk
Should not require socket path to be set in both firecracker.Config and firecracker.VMCommandBuilder
- Dominant language
- Go
- Stars
- 672
- Forks
- 166
- PR merge metrics
- No merged PRs in 30d
Description
The SDK currently requires the socket path to be set in two places, and for it to be set to the same thing:
* [firecracker.Config](https://github.com/firecracker-microvm/firecracker-go-sdk/blob/57448b62dc5998a32cb240f4991f7c5203ef8773/machine.go#L42-L45)
* [firecracker.VMCommandBuilder](https://github.com/firecracker-microvm/firecracker-go-sdk/blob/57448b62dc5998a32cb240f4991f7c5203ef8773/command_builder.go#L36)
`firecracker.VMCommandBuilder` is used for building the command to start the `firecracker` binary. Specifying the socket path here adds the `--api-sock` command-line argument that tells Firecracker to open the socket in a particular location.
`firecracker.Config` is used in the API client so that the client knows how to talk to the Firecracker API.
In order to both start a VM and communicate with it, a user of this SDK is required to specify the socket path in both places. If the user is intending to start a VM and immediately control it (which I think is the most common case), we should make it simpler to do so and allow the field to be specified only once.
Contributor guide
Assessment
This issue has not been assessed yet.