<fix>[vm]: pass guest OS type to kvmagent - #4707
Conversation
Resolves: ZSTAC-87832 Change-Id: I876a25b0082e4b00c9078905e5f1ba2197dd0e2a
|
Warning
|
| Layer / File(s) | Summary |
|---|---|
启动命令契约与 KVMHost wiring plugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.java, plugin/kvm/src/main/java/org/zstack/kvm/KVMHost.java |
StartVmCmd 增加 guestOsType 字段及其 getter/setter。KVMHost 从虚拟机配置读取 guestOsType,并将其加入启动命令。 |
guest OS 类型集成验证 test/src/test/groovy/org/zstack/test/integration/kvm/vm/ChangeVmGuestOsCase.groovy |
测试捕获 KVM 启动命令,并验证初始值及 Ubuntu 22.04、Debian 12、CentOS 7 更新后的 guest OS 类型。 |
Estimated code review effort: 2 (Simple) | ~10 minutes
Merge Risk: ⚪ Minimal · up to dada0
The change passes guest OS information to support guest-specific CPU hotplug handling, with targeted tests and build checks passing. No actionable merge-blocking risk remains after normal review.
Sequence Diagram(s)
sequenceDiagram
participant VmInstanceInventory
participant KVMHost
participant KVMAgent
VmInstanceInventory->>KVMHost: 提供 guestOsType
KVMHost->>KVMAgent: 发送 StartVmCmd(guestOsType)
KVMAgent-->>KVMHost: 接收启动命令
Suggested reviewers: liang-hanyu, majin1996
Poem
兔子捧着启动令,
guest OS 类型写分明。
Ubuntu、Debian、CentOS,
重启验证都同步。
KVM agent 收到值,
月光下安心蹦几步。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题准确概括了将客户机操作系统类型传递给 kvmagent 的主要变更。 |
| Description check | ✅ Passed | 描述与变更内容相关,并说明了协议字段、数据来源和测试范围。 |
| Docstring Coverage | ✅ Passed | Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
sync/zstackio/fix/5.4.13/ZSTAC-87832@@2
Comment @coderabbitai help to get the list of available commands.
|
Comment from yaohua.wu: Review: MR !10759 — ZSTAC-87832Background (preserved across rounds)
Findings
Coverage
Verdict: APPROVED本 MR 的字段版本门槛、赋值位置和回归测试与 Jira 方案及配套 agent 实现一致;剩余风险集中在双仓发布配套和目标环境联调,不构成本 MR 的代码阻塞项。 🤖 Robot Reviewer |
Summary
Pass the VM guest OS type to kvmagent so guest-specific CPU hotplug handling can be selected safely.
Changes
Testing
git diff --check: passed.Resolves: ZSTAC-87832
sync from gitlab !10759