Skip to content

engine: enforce optional cpu trait compatibility - #5

Merged
ironashram merged 2 commits into
mainfrom
feat/cpu-feature-compatibility
Sep 28, 2026
Merged

ironashram merged 2 commits into
mainfrom
feat/cpu-feature-compatibility

Conversation

@ironashram

Copy link
Copy Markdown
Member

Adds require_cpu_compatibility, disabled by default. When enabled, destinations must expose every source host HW_CPU_* Placement trait.

  • Applies to all four planning paths.
  • Rejects missing trait data and caches verdicts per cycle.
  • Records CPU traits in snapshots and supports offline replay.

Validation:

  • 382 tests pass, plus Ruff, mypy and pyright.
  • Removing the guard fails all four planning regression cases.
  • Live kol1k test: an incompatible migration fails with a libvirt CPU mismatch when disabled and is blocked when enabled.
  • Compatible reverse migration succeeds.
  • Snapshot replay reproduces both planning outcomes.

Uses host traits rather than per-instance CPU models. Offline replay requires Placement claims enforcement disabled.

Signed-off-by: Michele Palazzi <sysdadmin@m1k.cloud>
Signed-off-by: Michele Palazzi <sysdadmin@m1k.cloud>
@ironashram
ironashram merged commit b08af9b into main Sep 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants