firecracker-containerd icon indicating copy to clipboard operation
firecracker-containerd copied to clipboard

Should we persist with parsing JSON config file for Firecracker VM opts?

Open aaithal opened this issue 7 years ago • 2 comments

PRs #109 and #105 provide clients the ability to pass Firecracker VM options using the FirecrackerConfig protobuf message. As per https://github.com/firecracker-microvm/firecracker-containerd/pull/109#discussion_r259130140:

Originally JSON was added as temp solution to simplify running. Here we have to manage two entities for configuration and keep overrideVMConfigFromTaskOpts to overwrite config params. This makes it more complicated than it should be and I see no reasons to keep old config.

Let's discuss the tradeoffs for continuing to parse default values from JSON config. So, option A is continue doing what's being done today (read json + build FC config + override protobuf). Option B would be defaults + protobuf.

aaithal avatar Feb 21 '19 21:02 aaithal

Related to https://github.com/firecracker-microvm/firecracker-containerd/issues/59

samuelkarp avatar Feb 21 '19 22:02 samuelkarp

Note that we have moved the VM options from FirecrackerConfig to CreateVMRequest.

https://github.com/firecracker-microvm/firecracker-containerd/commit/226d4476d4b28df4af215f7984a16a70f4899aa3#diff-349c85aae1d71151c001702f17a2b5f0

But we still have the merging logic.

https://github.com/firecracker-microvm/firecracker-containerd/blob/67f459d198c16162459e5021ec3f91fbe6b0f750/runtime/helpers.go#L25

kzys avatar Jul 26 '19 21:07 kzys