<feature>[kvm]: add iothread vq mapping data path#4169
Conversation
|
Warning Review limit reached
More reviews will be available in 20 minutes and 58 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Warning
|
| Layer / File(s) | Summary |
|---|---|
主机 QEMU-KVM 包版本数据结构 plugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.java |
在 HostFactResponse 中新增版本受控字段 qemuKvmPackageVersion 与对应的 getter/setter 方法,与既有的 libvirtPackageVersion 字段平行。 |
主机包版本系统标签定义 plugin/kvm/src/main/java/org/zstack/kvm/KVMSystemTags.java |
新增 QEMU_KVM_PACKAGE_VERSION_TOKEN 与 QEMU_KVM_PACKAGE_VERSION 系统标签模式常量,标签前缀为 qemu-kvm::package::version::,绑定到 HostVO。 |
主机包版本持久化与清理逻辑 plugin/kvm/src/main/java/org/zstack/kvm/KVMHost.java |
在 saveKvmHostRelatedFacts 中升级 libvirt/qemu-kvm 包版本字段的条件判断,将"null 检查"升级为"非空白检查",空白时显式删除对应标签,非空白时才 trim 后更新。 |
主机包版本标签清理测试 test/src/test/groovy/org/zstack/test/integration/kvm/host/AddHostCase.groovy |
新增 testPackageVersionTagsClearedWhenFactMissing() 测试方法,覆盖两个场景:fact 存在时系统标签被正确设置,fact 缺失/为空时重连主机后系统标签被清空。 |
卷 IOThread 配置字段与访问器 plugin/kvm/src/main/java/org/zstack/kvm/VolumeTO.java, sdk/src/main/java/org/zstack/sdk/VolumeTO.java |
在两个 VolumeTO 实现中新增 ioThreads 字段(0 表示自动 IOThread VQ 映射被禁用),plugin 版本同步拷贝构造器,两个版本均提供 getter/setter 方法。 |
IOThread VQ 映射版本阈值常量 plugin/kvm/src/main/java/org/zstack/kvm/KVMConstant.java |
新增两个版本常量用于表示 QEMU-KVM 与 libvirt IOThread VQ 映射功能的最小支持版本号(分别为 6.2.0-451 与 8.0.0-163)。 |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
🐰 灰度包版本如微风,qemu-kvm 随 iothread 启航,
标签清理似春雨细润,卷配置更新展宽广,
主机事实步步追踪,兔子为你整理八方。
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题准确反映了本次变更的主要目标——为KVM的IOThread VQ映射添加数据路径支持。 |
| Description check | ✅ Passed | 描述清晰地涵盖了所有变更内容,包括报告qemu-kvm版本、添加主机能力常量、在VolumeTO中传递ioThreads信息和测试覆盖。 |
| 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. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
sync/haidong.pang/feature/iothread-vq-mapping@@3
Comment @coderabbitai help to get the list of available commands and usage tips.
Resolves: ZSTAC-82672 Change-Id: Ib43a7a02a0528cc40cd8aa370b93b7fba7dfc051
548a60a to
637f949
Compare
Summary
Add the KVM-side data contract for automatic IOThread VQ mapping.
Changes
ioThreadsthroughVolumeTOand SDKVolumeTOfor KVM agent consumption.sync from gitlab !10075