Skip to content

Conversation

yaroslavborbat
Copy link
Member

@yaroslavborbat yaroslavborbat commented Sep 24, 2025

Description

This PR fixes several critical bugs related to volume migration in VM operations:

1. Fixed Migrating Condition and Generation Sync

  • Problem: Incorrect handling of the Migrating condition and lack of proper synchronization.
  • Solution: Added proper synchronization logic and correct setting of observedGeneration to ensure state consistency.

2. Blocked RWO Volume Migration with Immediate Failure

  • Problem: Attempting to migrate VM with RWO (ReadWriteOnce) volumes was causing undefined behavior.
  • Solution: VMOP now immediately fails the migration operation when RWO volumes are detected, as this configuration is not supported. Added e2e test.

3. Fixed Pending State Hang and Volume Sync on KVVM

  • Problem: VM operations could hang indefinitely in Pending state due to volume synchronization issues on KVVM.
  • Solution: Implemented proper volume synchronization logic to prevent hanging and ensure smooth state transitions.

4. Prevented Unplanned Restarts from Unexpected State

  • Problem: Presence of unexpected state could trigger unplanned VM restarts.
  • Solution: Added validation and handling logic to prevent restarts caused by unexpected state conditions.

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

What is the expected result?

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.

Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
@Isteb4k Isteb4k merged commit 3675008 into main Sep 25, 2025
32 of 35 checks passed
@Isteb4k Isteb4k deleted the fix/vm/volume-migration branch September 25, 2025 16:11
@Isteb4k
Copy link
Contributor

Isteb4k commented Sep 25, 2025

/backport 1.1

github-actions bot pushed a commit that referenced this pull request Sep 25, 2025
This PR fixes several critical bugs related to volume migration in VM operations:

1. Fixed Migrating Condition and Generation Sync
Problem: Incorrect handling of the Migrating condition and lack of proper synchronization.
Solution: Added proper synchronization logic and correct setting of observedGeneration to ensure state consistency.
2. Blocked RWO Volume Migration with Immediate Failure
Problem: Attempting to migrate VM with RWO (ReadWriteOnce) volumes was causing undefined behavior.
Solution: VMOP now immediately fails the migration operation when RWO volumes are detected, as this configuration is not supported. Added e2e test.
3. Fixed Pending State Hang and Volume Sync on KVVM
Problem: VM operations could hang indefinitely in Pending state due to volume synchronization issues on KVVM.
Solution: Implemented proper volume synchronization logic to prevent hanging and ensure smooth state transitions.
4. Prevented Unplanned Restarts from Unexpected State
Problem: Presence of unexpected state could trigger unplanned VM restarts.
Solution: Added validation and handling logic to prevent restarts caused by unexpected state conditions.

Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
deckhouse-BOaTswain added a commit that referenced this pull request Sep 25, 2025
fix(vm): fix some volume migration bugs (#1498)

This PR fixes several critical bugs related to volume migration in VM operations:

1. Fixed Migrating Condition and Generation Sync
Problem: Incorrect handling of the Migrating condition and lack of proper synchronization.
Solution: Added proper synchronization logic and correct setting of observedGeneration to ensure state consistency.
2. Blocked RWO Volume Migration with Immediate Failure
Problem: Attempting to migrate VM with RWO (ReadWriteOnce) volumes was causing undefined behavior.
Solution: VMOP now immediately fails the migration operation when RWO volumes are detected, as this configuration is not supported. Added e2e test.
3. Fixed Pending State Hang and Volume Sync on KVVM
Problem: VM operations could hang indefinitely in Pending state due to volume synchronization issues on KVVM.
Solution: Implemented proper volume synchronization logic to prevent hanging and ensure smooth state transitions.
4. Prevented Unplanned Restarts from Unexpected State
Problem: Presence of unexpected state could trigger unplanned VM restarts.
Solution: Added validation and handling logic to prevent restarts caused by unexpected state conditions.

Signed-off-by: Yaroslav Borbat <yaroslav.borbat@flant.com>
Co-authored-by: Yaroslav Borbat <86148689+yaroslavborbat@users.noreply.github.com>
@deckhouse-BOaTswain
Copy link
Contributor

Cherry pick PR 1505 to the branch release-1.1 successful!

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

Successfully merging this pull request may close these issues.

3 participants