v1.6.0

firecracker-microvm/firecrackerv1.6.0Dec 20, 2023by pb8o

AI Summary

A feature-rich release introducing per-device metrics, an enhanced snapshot editor with tracing support, and developer preview vhost-user block device support.

Key Highlights

  • Added support for per-network and per-block device metrics.
  • Added `vm-state` subcommand to `snapshot-editor` for readable MicroVMState output.
  • Added developer preview support for vhost-user block devices.
  • Improved snapshot rebasing by allowing direct writing of diff snapshots onto base snapshots.

Breaking Changes

  • Removed support for creating snapshots targeting older versions of Firecracker.
  • Deprecated the `rebase-snap` tool in favor of `snapshot-editor`.
  • Deprecated `cpu_template` field in machine-config API requests.

New Features

  • Per-device metrics (net and block)
  • Snapshot editor vm-state subcommand
  • Source-level instrumentation tracing
  • Vhost-user block device support

Full Release Notes

### Added

  - [#4145](https://github.com/firecracker-microvm/firecracker/pull/4145): Added support for per net device metrics. In addition to aggregate metrics `net`, each individual net device will emit metrics under the label `"net_{iface_id}"`. E.g. the associated metrics for the endpoint `"/network-interfaces/eth0"` will be available under `"net_eth0"` in the metrics json object.
  - [#4202](https://github.com/firecracker-microvm/firecracker/pull/4202): Added support for per block device metrics. In addition to aggregate metrics `block`, each individual block device will emit metrics under the label `"block_{drive_id}"`. E.g. the associated metrics for the endpoint `"/drives/{drive_id}"` will be available under `"block_drive_id"` in the metrics json object.
  - [#4205](https://github.com/firecracker-microvm/firecracker/pull/4205): Added a new `vm-state` subcommand to `info-vmstate` command in the `snapshot-editor` tool to print MicrovmState of vmstate snapshot file in a readable format. Also made the `vcpu-states` subcommand available on x86\_64.
  - [#4063](https://github.com/firecracker-microvm/firecracker/pull/4063): Added source-level instrumentation based tracing. See [tracing](./docs/tracing.md) for more details.
  - [#4138](https://github.com/firecracker-microvm/firecracker/pull/4138), [#4170](https://github.com/firecracker-microvm/firecracker/pull/4170), [#4223](https://github.com/firecracker-microvm/firecracker/pull/4223), [#4247](https://github.com/firecracker-microvm/firecracker/pull/4247), [#4226](https://github.com/firecracker-microvm/firecracker/pull/4226): Added **developer preview only** (NOT for production use) support for vhost-user block devices. Firecracker implements a vhost-user frontend. Users are free to choose from existing open source backend solutions or their own implementation. Known limitation: snapshotting is not currently supported for microVMs containing vhost-user block devices. See the [related doc page](./docs/api_requests/block-vhost-user.md) for details. The device emits metrics under the label `"vhost_user_{device}_{drive_id}"`.

### Changed

  - [#4309](https://github.com/firecracker-microvm/firecracker/pull/4309): The jailer’s option `--parent-cgroup` will move the process to that cgroup if no `cgroup` options are provided.
  - Simplified and clarified the removal policy of deprecated API elements to follow semantic versioning 2.0.0. For more information, please refer to [this GitHub discussion](https://github.com/firecracker-microvm/firecracker/discussions/4135).
  - [#4180](https://github.com/firecracker-microvm/firecracker/pull/4180): Refactored error propagation to avoid logging and printing an error on exits with a zero exit code. Now, on successful exit “Firecracker exited successfully” is logged.
  - [#4194](https://github.com/firecracker-microvm/firecracker/pull/4194): Removed support for creating Firecracker snapshots targeting older versions of Firecracker. With this change, running ‘firecracker –version’ will not print the supported snapshot versions.
  - [#4301](https://github.com/firecracker-microvm/firecracker/pull/4301): Allow merging of diff snapshots into base snapshots by directly writing the diff snapshot on top of the base snapshot’s memory file. This can be done by setting the `mem_file_path` to the path of the pre-existing full snapshot.

### Deprecated

  - [#4209](https://github.com/firecracker-microvm/firecracker/pull/4209): `rebase-snap` tool is now deprecated. Users should use `snapshot-editor` for rebasing diff snapshots.

### Fixed

  - [#4171](https://github.com/firecracker-microvm/firecracker/pull/4171): Fixed a bug that ignored the `--show-log-origin` option, preventing it from printing the source code file of the log messages.
  - [#4178](https://github.com/firecracker-microvm/firecracker/pull/4178): Fixed a bug reporting a non-zero exit code on successful shutdown when starting Firecracker with `--no-api`.
  - [#4261](https://github.com/firecracker-microvm/firecracker/pull/4261): Fixed a bug where Firecracker would log “RunWithApiError error: MicroVMStopped without an error: GenericError” when exiting after encountering an emulation error. It now correctly prints “RunWithApiError error: MicroVMStopped *with* an error: GenericError”.
  - [#4242](https://github.com/firecracker-microvm/firecracker/pull/4242): Fixed a bug introduced in #4047 that limited the `--level` option of logger to Pascal-cased values (e.g. accepting “Info”, but not “info”). It now ignores case again.
  - [#4286](https://github.com/firecracker-microvm/firecracker/pull/4286): Fixed a bug in the asynchronous virtio-block engine that rendered the device non-functional after a PATCH request was issued to Firecracker for updating the path to the host-side backing file of the device.
  - [#4301](https://github.com/firecracker-microvm/firecracker/pull/4301): Fixed a bug where if Firecracker was instructed to take a snapshot of a microvm which itself was restored from a snapshot, specifying `mem_file_path` to be the path of the memory file from which the microvm was restored would result in both the microvm and the snapshot being corrupted. It now instead performs a “write-back” of all memory that was updated since the snapshot was originally loaded.