firectl icon indicating copy to clipboard operation
firectl copied to clipboard

Compatibility with firecracker 1.0

Open alexellis opened this issue 2 years ago • 8 comments

Certain examples fail with an error about the ht_ field:

As per the 1.0 notes:

  • Renamed /machine-config ht_enabled to smt.
  • smt field is now optional on PUT /machine-config, defaulting to false.

The renaming of ht_enabled to smt is a breaking change, so firectl doesn't work out of the box with firecracker 1.0 at the moment.

I'd suggest updating it.

root@firecracker-hacking:~/debian-firecracker# firectl --kernel=debian-vmlinux --root-drive=debian.ext4 --kernel-opts="init=/bin/systemd noapic reboot=k panic=1 pci=off nomodules console=ttyS0"
INFO[0000] Called startVMM(), setting up a VMM on /root/.firecracker.sock-80256-81 
INFO[0000] VMM logging and metrics disabled.            
2022-03-01T16:30:10.007433263 [anonymous-instance:fc_api:ERROR:src/api_server/src/lib.rs:270] An error occurred when deserializing the json body of a request: unknown field `ht_enabled`, expected one of `vcpu_count`, `mem_size_mib`, `smt`, `cpu_template`, `track_dirty_pages` at line 1 column 13.
ERRO[0000] PutMachineConfiguration returned [PUT /machine-config][204] putMachineConfigurationNoContent  
WARN[0000] Failed handler "fcinit.CreateMachine": [PUT /machine-config][400] putMachineConfigurationBadRequest  &{FaultMessage:An error occurred when deserializing the json body of a request: unknown field `ht_enabled`, expected one of `vcpu_count`, `mem_size_mib`, `smt`, `cpu_template`, `track_dirty_pages` at line 1 column 13.} 
FATA[0000] Failed to start machine: [PUT /machine-config][400] putMachineConfigurationBadRequest  &{FaultMessage:An error occurred when deserializing the json body of a request: unknown field `ht_enabled`, expected one of `vcpu_count`, `mem_size_mib`, `smt`, `cpu_template`, `track_dirty_pages` at line 1 column 13.} 
root@firecracker-hacking:~/debian-firecracker# 

Adding --disable-hyperthreading works as a workaround whilst we're waiting on a code change / new release here.

alexellis avatar Mar 01 '22 16:03 alexellis

cc @Kern-- / @kzys

alexellis avatar Mar 01 '22 16:03 alexellis

#80 updated to the latest SDK which should work with firecracker 1.0 about 2 weeks ago. Commit 7b0c58ee0e7c9214f822cf8ad7234aaa98d380e7. Can you try that?

I also submitted #83 to update the readme to match the arg change to --disable-smt

Kern-- avatar Mar 01 '22 16:03 Kern--

@Kern-- thanks for the comment. There is only one binary release available made on 29 May 2019, so that commit I assume is not part of it.

We need a maintainer to cut a new release then. @kzys @samuelkarp WDYT, is anything preventing that happening?

alexellis avatar Mar 02 '22 09:03 alexellis

Sounds good to me. Unlike Firecracker Go SDK, the versioning scheme of firectl is not tied to Firecracker. So we can release what we have as 0.2.0.

kzys avatar Mar 03 '22 00:03 kzys

Are there any chances that there will be a new release?

daro1337 avatar Jul 11 '22 07:07 daro1337

building from main in the interim works just fine

Tombar avatar Jul 28 '22 03:07 Tombar

A new release would be appreciated though

jeffwidman avatar Oct 11 '22 22:10 jeffwidman

@Tombar that isn't really a suitable solution if using firectl in a project/product which others need to consume. It may be doable for local testing.

Cutting a release is not a big job, neither is making automated binaries appear via a GitHub Action.

If the maintainers want some help, just shout.

alexellis avatar Oct 12 '22 08:10 alexellis

A new release has been cut: https://github.com/firecracker-microvm/firectl/releases/tag/v0.2.0

turan18 avatar Oct 24 '22 17:10 turan18