fix(upgrade): compare incoming version in updateAgentVersion#3879
Open
zstack-robot-2 wants to merge 1 commit into5.5.16from
Open
fix(upgrade): compare incoming version in updateAgentVersion#3879zstack-robot-2 wants to merge 1 commit into5.5.16from
zstack-robot-2 wants to merge 1 commit into5.5.16from
Conversation
UpgradeChecker.updateAgentVersion early-returned when DB.expectVersion equals DB.currentVersion, ignoring the new version reported by ping. Once a host record reached the stable current==expect state, any subsequent ping bringing a different version was silently dropped, breaking grayscale upgrade tracking and causing GrayscaleUpgradeCase to fail intermittently when HostTracker's background ping created the stable record before the test mutated the simulator. Compare DB current/expect against the incoming parameters instead, and update both fields together so expectVersion stays in sync with dbf.getDbVersion(). Resolves: ZSTAC-84886 Change-Id: I63636b6f696b6463756f656c627367617a6d6a79
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
演练
变更
评估代码审查工作量🎯 2 (简单) | ⏱️ ~8 分钟 诗
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Review rate limit: 4/5 reviews remaining, refill in 12 minutes. 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.
Background
UpgradeChecker.updateAgentVersionearly-returned when DB.expectVersion equals DB.currentVersion, ignoring the new version reported by ping. Once a host record reached the stablecurrent == expectstate, any subsequent ping bringing a different version was silently dropped — breaking grayscale upgrade version tracking.This also explains the intermittent failure of
premium_premium_kvm_upgrade_GrayscaleUpgradeCase: when HostTracker's background ping happened to fire between enablingGRAYSCALE_UPGRADEand overriding the KVM_PING simulator, it created a stable VO row, after which the test's manually issued ping carryingversion=4.7.21was dropped by the buggy early-return, and the assertioncurrentVersion == "4.7.21"failed.Fix
Compare DB current/expect against the incoming parameters instead of comparing DB fields to each other; update both fields together so
expectVersionstays in sync withdbf.getDbVersion().Jira
Resolves: ZSTAC-84886
sync from gitlab !9759