Skip to content

fix(vd): allow only rollback storage class during active migration#2116

Merged
LopatinDmitr merged 1 commit intomainfrom
fix/vd/validate-storage-class-with-volume-migration
Mar 24, 2026
Merged

fix(vd): allow only rollback storage class during active migration#2116
LopatinDmitr merged 1 commit intomainfrom
fix/vd/validate-storage-class-with-volume-migration

Conversation

@LopatinDmitr
Copy link
Copy Markdown
Contributor

@LopatinDmitr LopatinDmitr commented Mar 17, 2026

Description

Prevent changing VirtualDisk storage class to an arbitrary value while migration is in progress by allowing only rollback to the source PVC storage class. Added validator tests for forbidden A->B->C changes and allowed rollback to A.

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

When a migration is active, changing the storage class may cause the rare error `VolumesUpdateError'.

What is the expected result?

Attempt to change the storage class during active migration should fail except when reverting to the original storage class.

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: vd
type: fix
summary: Prevent arbitrary storage class changes during active VirtualDisk migration, allowing rollback only.

@LopatinDmitr LopatinDmitr added this to the v1.8.0 milestone Mar 17, 2026
@LopatinDmitr LopatinDmitr force-pushed the fix/vd/validate-storage-class-with-volume-migration branch 2 times, most recently from 6b62b30 to f6dc043 Compare March 24, 2026 10:36
@LopatinDmitr LopatinDmitr marked this pull request as ready for review March 24, 2026 10:38
@LopatinDmitr LopatinDmitr requested a review from eofff March 24, 2026 10:38
eofff
eofff previously approved these changes Mar 24, 2026
Prevent changing VirtualDisk storage class to an arbitrary value while migration is in progress by allowing only rollback to the source PVC storage class. Add validator tests for forbidden A->B->C changes and allowed rollback to A.

Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
@LopatinDmitr LopatinDmitr force-pushed the fix/vd/validate-storage-class-with-volume-migration branch from f6dc043 to 84c2a56 Compare March 24, 2026 12:02
@LopatinDmitr LopatinDmitr requested a review from eofff March 24, 2026 12:02
@LopatinDmitr LopatinDmitr merged commit 7c2dca1 into main Mar 24, 2026
27 of 28 checks passed
@LopatinDmitr LopatinDmitr deleted the fix/vd/validate-storage-class-with-volume-migration branch March 24, 2026 12:13
Isteb4k pushed a commit that referenced this pull request Mar 25, 2026
…2116)

- Prevent changing VirtualDisk storage class to an arbitrary value while migration is in progress by allowing only rollback to the source PVC storage class. Add validator tests for forbidden A->B->C changes and allowed rollback to A.

Signed-off-by: Dmitry Lopatin <dmitry.lopatin@flant.com>
(cherry picked from commit 7c2dca1)
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