Skip to content

Conversation

@danilrwx
Copy link
Contributor

@danilrwx danilrwx commented Jan 19, 2026

Description

Fixed the logic for clearing the Migrating condition in the MigratingHandler. The changes ensure that the condition is properly removed when migrations are completed, failed, or not requested, and improve the handling of migration state synchronization.

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

Previously, the Migrating condition could remain in the VM status even after migrations were completed or failed, leading to:

  • Stale conditions: Users and monitoring systems would see migration conditions that no longer reflect the actual state
  • Inconsistent state: The condition would persist even when no migration was in progress or requested
  • UI/monitoring confusion: Dashboards and alerts would incorrectly indicate ongoing migrations

What is the expected result?

  1. When migration completes successfully: The Migrating condition is removed from the VM status when VMOP reaches ReasonOperationCompleted or VMOPPhaseCompleted.

  2. When migration fails: The Migrating condition is removed when VMOP reaches VMOPPhaseFailed phase, ensuring failed migrations don't leave stale conditions.

  3. When VM is stopped (KVVMI is nil): The Migrating condition is removed since live migration cannot occur without a running VM instance.

  4. When migration operation is terminating: The condition is removed when VMOP enters VMOPPhaseTerminating phase.

  5. When no migration is requested: The condition is removed if there's no active migration operation.

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: Remove migrating condition for failed VM Migration.

@danilrwx danilrwx force-pushed the fix/vm/migration-condition-clearing branch 2 times, most recently from 08b25f6 to 3dfa74c Compare January 19, 2026 14:21
Signed-off-by: Daniil Antoshin <[email protected]>

remove unused

Signed-off-by: Daniil Antoshin <[email protected]>

remove

Signed-off-by: Daniil Antoshin <[email protected]>
@danilrwx danilrwx force-pushed the fix/vm/migration-condition-clearing branch from 70dd645 to 4b71acb Compare January 19, 2026 16:15
@danilrwx danilrwx marked this pull request as ready for review January 20, 2026 17:33
@danilrwx danilrwx added this to the v1.5.0 milestone Jan 20, 2026
@danilrwx danilrwx added the e2e/run Run e2e test on cluster of PR author label Jan 20, 2026
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Jan 20, 2026

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jan 20, 2026
@danilrwx danilrwx added the e2e/run Run e2e test on cluster of PR author label Jan 20, 2026
@deckhouse-BOaTswain
Copy link
Contributor

deckhouse-BOaTswain commented Jan 20, 2026

Workflow has started.
Follow the progress here: Workflow Run

The target step completed with status: failure.

@deckhouse-BOaTswain deckhouse-BOaTswain removed the e2e/run Run e2e test on cluster of PR author label Jan 20, 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.

4 participants