<fix>[compute]: respect vm.migrationQuantity during host maintenance#3374
Open
zstack-robot-1 wants to merge 1 commit into5.5.12from
Open
<fix>[compute]: respect vm.migrationQuantity during host maintenance#3374zstack-robot-1 wants to merge 1 commit into5.5.12from
zstack-robot-1 wants to merge 1 commit into5.5.12from
Conversation
Resolves: ZSTAC-81354 Change-Id: Iff2131b3a878444fa27641f24dd727fe4fa176fb
|
No actionable comments were generated in the recent review. 🎉 走览移除了在扩展点提供VM顺序时强制将 变更
代码审查工作量🎯 1 (Trivial) | ⏱️ ~3 分钟 诗
🚥 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 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
In
HostBase.maintenanceHook(), when anyOrderVmBeforeMigrationDuringHostMaintenanceExtensionPointreturns an ordered VM list,migrateQuantitywas unconditionally forced to 1 (line 416). SinceHaManagerImplalways returns non-null (even when no VMs have HA tags), the user-configuredvm.migrationQuantityglobal config was never effective during host maintenance mode.Solution
Remove the
migrateQuantity = 1override. The VM ordering is preserved by list position — HA VMs remain at the front of the list. TheWhileloop processes items in order with the user-configured concurrency level, so HA VMs are still prioritized in early batches.Testing
mvn compile -pl compute -am -Dmaven.test.skipWhile.step(callback, migrateQuantity)processes N items concurrently from the ordered list, preserving priority orderingJira
Resolves: ZSTAC-81354
Note: Companion MR in premium repo (HaManagerImpl returns null when no HA tags exist).
sync from gitlab !9209