Skip to content

<feature>[storage]: ZSV-12664 guard operations during volume encryption conversion#4575

Open
ZStack-Robot wants to merge 3 commits into
codex/zbs-change-volume-encryption@@2from
sync/zstackio/codex/volume-encryption-conversion-operation-guard
Open

<feature>[storage]: ZSV-12664 guard operations during volume encryption conversion#4575
ZStack-Robot wants to merge 3 commits into
codex/zbs-change-volume-encryption@@2from
sync/zstackio/codex/volume-encryption-conversion-operation-guard

Conversation

@ZStack-Robot

Copy link
Copy Markdown
Collaborator

Summary

Prevent conflicting volume and VM operations while volume encryption conversion is in progress.

Changes

  • Add a dedicated converting volume status and manage its conversion lifecycle.
  • Reject VM start, migration, snapshot, and storage mutations during conversion.
  • Add ZBS integration coverage for guarded operations and status recovery.

Testing

  • cbok zsv groovy_test ZbsVolumeEncryptionCase (recorded in commit)
  • CI pipeline

Depends on: !10539

Resolves: ZSV-12664

sync from gitlab !10544

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5e77c29c-9749-4f4a-8f26-5b8c0dec7f38

📥 Commits

Reviewing files that changed from the base of the PR and between f78c317 and ba75bea.

⛔ Files ignored due to path filters (1)
  • conf/springConfigXml/VolumeManager.xml is excluded by !**/*.xml
📒 Files selected for processing (8)
  • header/src/main/java/org/zstack/header/volume/VolumeStatus.java
  • storage/src/main/java/org/zstack/storage/encrypt/VolumeEncryptedMigrateVmExtension.java
  • storage/src/main/java/org/zstack/storage/encrypt/VolumeEncryptedMigrateVmWithStorageExtension.java
  • storage/src/main/java/org/zstack/storage/encrypt/VolumeEncryptedStartExtension.java
  • storage/src/main/java/org/zstack/storage/encrypt/VolumeEncryptionConversionGuard.java
  • storage/src/main/java/org/zstack/storage/snapshot/group/VolumeSnapshotGroupBase.java
  • storage/src/main/java/org/zstack/storage/volume/VolumeBase.java
  • test/src/test/groovy/org/zstack/test/integration/storage/primary/addon/zbs/ZbsVolumeEncryptionCase.groovy
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/zstackio/codex/volume-encryption-conversion-operation-guard

Comment @coderabbitai help to get the list of available commands.

Mark converting volumes with a dedicated status.
Reject VM start, migration, snapshot, and storage mutations
until conversion finishes.

Tests: cbok zsv groovy_test ZbsVolumeEncryptionCase

Resolves: ZSV-12664

Change-Id: I3b00939e6b4036b158b9065fc684af733cd425b3
@MatheMatrix
MatheMatrix force-pushed the sync/zstackio/codex/volume-encryption-conversion-operation-guard branch from d065e59 to 9c23a62 Compare July 16, 2026 06:21
zhong.zhou added 2 commits July 16, 2026 14:36
Keep only ZBS conversion state assertions in the ZBS case.

The operation guard scenarios are covered by the common premium suite.

Tests: cbok zsv groovy_test EncryptVolumeConversionCase

Resolves: ZSV-12664

Change-Id: I6b870d35375f3dbb1403fdfec68bb48a46d4342f
Reject existing VM starts before host allocation when a volume is converting.

Tests: cbok zsv groovy_test EncryptVolumeConversionCase

Resolves: ZSV-12664

Change-Id: I5f7a93a5c54b8d0041c09622b8c7cc7aab20ad45
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