Skip to content

fix(vm): livemigration force handling for PreferForced/AlwaysForced#2179

Open
danilrwx wants to merge 2 commits intomainfrom
fix/vm/prefere-force-migration
Open

fix(vm): livemigration force handling for PreferForced/AlwaysForced#2179
danilrwx wants to merge 2 commits intomainfrom
fix/vm/prefere-force-migration

Conversation

@danilrwx
Copy link
Copy Markdown
Contributor

@danilrwx danilrwx commented Apr 1, 2026

Description

Fixes live migration force handling in CLI and controller policy evaluation.

Why do we need it, and what problem does it solve?

d8 v evict and d8 v migrate always sent spec.force=false by default.
Because of that, PreferForced was effectively overridden to allowAutoConverge=false, so migrations were running without throttling even when policy expected forced convergence.

Also, for AlwaysForced we keep strict rejection only for explicit force=false, while force=nil follows policy defaults.

What is the expected result?

  1. Set VM spec.liveMigrationPolicy: PreferForced.
  2. Run d8 v evict <vm> (without --force).
  3. Created VMOP should have spec.force unset (nil).
  4. Migration configuration should keep allowAutoConverge=true.
  5. For AlwaysForced:
    • force=nil -> valid
    • force=true -> valid
    • force=false -> rejected

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: vm
type: fix
summary: "CLI no longer sends force=false by default, and AlwaysForced policy now rejects only explicit force=false while preserving policy defaults for unset force."

danilrwx added 2 commits April 1, 2026 17:41
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
@danilrwx danilrwx changed the title fix(vm): livemigration policies fix(vm): livemigration force handling for PreferForced/AlwaysForced Apr 1, 2026
@danilrwx danilrwx marked this pull request as ready for review April 1, 2026 16:05
@danilrwx danilrwx added this to the v1.8.0 milestone Apr 1, 2026
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.

1 participant