firecracker-microvm / firectl

firectl is a command-line tool to run Firecracker microVMs
Apache License 2.0
467 stars 73 forks source link

Compatibility with firecracker 1.0 #82

Closed alexellis closed 1 year ago

alexellis commented 2 years ago

Certain examples fail with an error about the ht_ field:

As per the 1.0 notes:

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 commented 2 years ago

cc @Kern-- / @kzys

Kern-- commented 2 years ago

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

alexellis commented 2 years ago

@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?

kzys commented 2 years ago

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.

daro1337 commented 1 year ago

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

Tombar commented 1 year ago

building from main in the interim works just fine

jeffwidman commented 1 year ago

A new release would be appreciated though

alexellis commented 1 year ago

@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.

turan18 commented 1 year ago

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