<feature>[utils]: Network group high availability strategy#3402
<feature>[utils]: Network group high availability strategy#3402zstack-robot-2 wants to merge 1 commit intofeature-5.5.6-dpu-net-ha2from
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml) Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (12)
📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
Walkthrough新增 HA 网络组相关数据库表、KVM 代理命令与路径常量、测试库 API 辅助方法及大量运维错误码常量;在 StartVmCmd 中增加 enableHa 字段以支持 VM 的 HA 启用状态传递。 Changes
Sequence Diagram(s)sequenceDiagram
rect rgba(200,220,255,0.5)
participant User
end
rect rgba(200,255,200,0.5)
participant MgmtNode as ManagementNode(API / ApiHelper)
end
rect rgba(255,220,200,0.5)
participant DB as Database
end
rect rgba(255,200,220,0.5)
participant KVM as KVMAgent
end
User->>MgmtNode: 调用 updateHaNetworkGroup / 更新 VM HA
MgmtNode->>DB: 写入/读取 HaNetworkGroup 与关联表
MgmtNode->>KVM: POST /host/vm/updateEnableHa/live (UpdateVmEnableHaLiveCmd)
KVM->>MgmtNode: 返回执行结果
MgmtNode->>KVM: POST /host/vm/reconcileEnableHa/live (ReconcileVmEnableHaOnHostCmd)
KVM->>MgmtNode: 返回 reconcile 结果
MgmtNode->>User: 返回 API 响应
预估代码审查工作量🎯 3 (中等) | ⏱️ ~22 分钟 诗歌
🚥 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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.41.0)utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.javaComment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.java`:
- Around line 2273-2275: The `@GrayVersion` on StartVmCmd.enableHa is set too low
(5.0.0) and risks being sent to older agents; update the annotation to the
actual version this field was introduced in for this branch (use the
branch/release version constant or the correct semantic version), and apply the
same correction to the other occurrences referenced (the similar field block
around the 2752-2758 range). Locate the StartVmCmd.enableHa field and any
duplicate fields annotated with `@GrayVersion` and replace the version string with
the correct introduced-version value so grayscaling won't dispatch the new field
to incompatible older agents.
ℹ️ Review info
Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (12)
sdk/src/main/java/SourceClassMap.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/ChangeHaNetworkGroupStateAction.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/ChangeHaNetworkGroupStateResult.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/CreateHaNetworkGroupAction.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/CreateHaNetworkGroupResult.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/DeleteHaNetworkGroupAction.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/DeleteHaNetworkGroupResult.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/HaNetworkGroupInventory.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/QueryHaNetworkGroupAction.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/QueryHaNetworkGroupResult.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/UpdateHaNetworkGroupAction.javais excluded by!sdk/**sdk/src/main/java/org/zstack/sdk/UpdateHaNetworkGroupResult.javais excluded by!sdk/**
📒 Files selected for processing (5)
conf/db/upgrade/V5.5.12__schema.sqlplugin/kvm/src/main/java/org/zstack/kvm/KVMAgentCommands.javaplugin/kvm/src/main/java/org/zstack/kvm/KVMConstant.javatestlib/src/main/java/org/zstack/testlib/ApiHelper.groovyutils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java
DBImpact Resolves: ZSTAC-81413 Change-Id: I6a7574656467636e686377756f716d67707a7063
8f0e113 to
4cb34c8
Compare
DBImpact
Resolves: ZSTAC-81413
Change-Id: I6a7574656467636e686377756f716d67707a7063
sync from gitlab !9250