Skip to content

Conversation

@hardcoretime
Copy link
Contributor

@hardcoretime hardcoretime commented Nov 8, 2025

Description

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

Sometimes, when the virtual disk snapshot controller creates a batch of snapshots with required consistency, a race condition in the freeze or unfreeze filesystem operation can cause an inconsistent snapshot. To prevent this, the KubeVirt virtual machine instance is now annotated with a "freeze" or "unfreeze" request, and the service checks that the type of this request matches the fsFreezeStatus. The fsFreezeStatus is considered trusted only if it matches the request type.

What is the expected result?

Snapshots with required consistency now execute without race conditions in the filesystem freeze process.

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: vdsnapshot
type: fix
summary: "Snapshots with required consistency now execute without race conditions in the filesystem freeze process."

@hardcoretime hardcoretime added this to the v1.2.0 milestone Nov 8, 2025
@hardcoretime hardcoretime force-pushed the fix/vdsnapshot/freeze-request-race-condition branch 13 times, most recently from dffed0c to 9065409 Compare November 14, 2025 12:52
@hardcoretime hardcoretime marked this pull request as ready for review November 14, 2025 13:48
@hardcoretime hardcoretime force-pushed the fix/vdsnapshot/freeze-request-race-condition branch 2 times, most recently from e9dd407 to 1832bcf Compare November 17, 2025 16:37
@hardcoretime hardcoretime requested a review from Isteb4k November 17, 2025 16:37
@hardcoretime hardcoretime force-pushed the fix/vdsnapshot/freeze-request-race-condition branch 2 times, most recently from 19b8743 to 1824066 Compare November 19, 2025 13:22
@hardcoretime hardcoretime marked this pull request as draft November 20, 2025 08:08
Roman Sysoev added 3 commits November 20, 2025 12:43
Use kvvmi status instead of vm.

Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Roman Sysoev added 18 commits November 20, 2025 12:43
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
- add context to errors
- watch kvvmi fsFreezeStatus instead of vm fsFrozenCondition
- change freeze request annotation api group

Signed-off-by: Roman Sysoev <[email protected]>
Signed-off-by: Roman Sysoev <[email protected]>
@hardcoretime hardcoretime force-pushed the fix/vdsnapshot/freeze-request-race-condition branch from 1824066 to 3628c19 Compare November 20, 2025 09:45
@hardcoretime hardcoretime marked this pull request as ready for review November 20, 2025 10:45
@hardcoretime hardcoretime requested a review from Isteb4k November 20, 2025 10:45
Isteb4k
Isteb4k previously approved these changes Nov 20, 2025
@hardcoretime hardcoretime merged commit 783b63f into main Nov 21, 2025
27 of 28 checks passed
@hardcoretime hardcoretime deleted the fix/vdsnapshot/freeze-request-race-condition branch November 21, 2025 09:46
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.

3 participants