Skip to content

Migrate MMDS support from v1 to v2 #1185

Description

@richardcase

Background

flintlock hardcodes MMDS version 1 when generating the Firecracker VM config (MMDSVersion1 in infrastructure/microvm/firecracker/config.go / types.go), even though the V2 enum value already exists in types.go but is never selected.

Upstream Firecracker has had MMDS v2 as Generally Available for several releases, and MMDS v1 is now deprecated, with removal planned for Firecracker v2.0.0. This was identified while scoping support for Firecracker v1.16.1 — it isn't a blocker for v1.16.1 compatibility today, but staying on v1 is a dead end as upstream moves toward removing it.

What needs to change

  • Switch the MMDS config generation in infrastructure/microvm/firecracker/config.go to use MMDS v2 (MMDSVersion2 / "V2") instead of MMDSVersion1.
  • MMDS v2 is session-token-based (requires a PUT to the token endpoint before GET/PUT requests), so any guest-side tooling/cloud-init scripts that read MMDS data assuming v1's tokenless access will need to be checked/updated.
  • Update relevant docs (e.g. userdocs/docs/getting-started/firecracker.md) and any example guest images/cloud-init snippets that query MMDS.
  • Add/adjust unit tests in infrastructure/microvm/firecracker/config_test.go to assert the v2 config is produced.

References

  • Firecracker CHANGELOG: MmdsV2 GA + MmdsV1 deprecation notice.
  • infrastructure/microvm/firecracker/types.go (MMDS version enum)
  • infrastructure/microvm/firecracker/config.go (MMDS config construction)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/firecrackerIndicates an issue or PR related to Firecrackerkind/featureNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions