<fix>[storage]: exclude deleted volumes from recalculate and sync physical capacity on reconnect#3677
Open
zstack-robot-2 wants to merge 1 commit intomasterfrom
Open
<fix>[storage]: exclude deleted volumes from recalculate and sync physical capacity on reconnect#3677zstack-robot-2 wants to merge 1 commit intomasterfrom
zstack-robot-2 wants to merge 1 commit intomasterfrom
Conversation
…sical capacity on reconnect Resolves: ZSTAC-80937 Change-Id: I5380a3cb223c675c20418831fffe5c107089b5ea
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
功能概览在主存储连接成功流程中, 变更内容
代码审查工作量评估🎯 2 (简单) | ⏱️ ~8 分钟 庆祝诗
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root Cause
PrimaryStorageCapacityRecalculator.recalculate() 第78行将 VolumeStatus.Deleted 计入 needCountVolumeStates,Deleted 卷在删除时已归还虚拟容量,但 recalculate() 又将其计入占用,导致双重扣减,存储池分配率异常增长。
次要问题:doConnect() 成功后直接发 RecalculatePrimaryStorageCapacityMsg,未先同步物理容量。
Solution
Testing
Jira
Resolves: ZSTAC-80937
sync from gitlab !9538