<feature>[storage]: register and take over sblk#3744
<feature>[storage]: register and take over sblk#3744zstack-robot-2 wants to merge 2 commits intozsv_5.0.0from
Conversation
APIImpact Resolves: ZSV-11559 Change-Id: I70637377776e777070676c6a6c616e74786b6667
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough新增三条主存储相关 REST 接口及其 SDK 支持:检查主存储一致性(GET /primary-storage/{uuid}/consistency)、接管主存储(PUT /primary-storage/{uuid}/takeover)和发现共享块组卷组(GET /primary-storage/sharedblockgroup/vgs);包含请求/响应消息、事件类、SDK Action/Result、中文文档、SourceClassMap 映射、ReconnectResult 类型与测试辅助方法,并在 PrimaryStorageBase 中加入默认“不支持”处理。 Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client/SDK
participant API as API Server
participant PSBase as PrimaryStorageBase
participant Bus as MessageBus
Client->>API: GET /primary-storage/{uuid}/consistency
API->>PSBase: APICheckPrimaryStorageConsistencyMsg
PSBase->>PSBase: 检查是否支持该操作(默认不支持)
PSBase->>API: APICheckPrimaryStorageConsistencyReply (error: not supported)
API->>Client: HTTP 200 + body (consistent + error)
sequenceDiagram
participant Client as Client/SDK
participant API as API Server
participant PSBase as PrimaryStorageBase
participant Bus as MessageBus
Client->>API: PUT /primary-storage/{uuid}/takeover
API->>PSBase: APITakeoverPrimaryStorageMsg
PSBase->>PSBase: 判断是否支持接管(默认不支持)
PSBase->>API: APITakeoverPrimaryStorageEvent (inventory + reconnectResult with error)
API->>Client: HTTP 200 + event payload
sequenceDiagram
participant Client as Client/SDK
participant API as API Server
participant PSBase as PrimaryStorageBase
Client->>API: GET /primary-storage/sharedblockgroup/vgs?clusterUuid=...
API->>PSBase: DiscoverSharedBlockGroupVgs request -> 转发至处理逻辑
PSBase->>API: DiscoverSharedBlockGroupVgsResult (vgInfos map)
API->>Client: HTTP 200 + vgInfos
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 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 |
131dc21 to
ad13a93
Compare
|
Comment from jin.ma: API 评审意见(对抗式三轮评审 + 抽象层审计)一、抽象层泄露本 MR 新增的两个 API 本身命名良好( 但
二、设计层面建议经过精简派 vs 保留派三轮对抗评审,Tech Lead 最终裁决如下: P0 — 建议修改1.
2. 建议将 三轮辩论的核心结论:
如果保留独立 Check API,建议至少确保 takeover 内部的 check 与外部 API 的 check 使用同一份逻辑,避免不一致。 P1 — 注意事项3. API 定义在 模板方法 + 默认返回 |
3e65b86 to
3d34c2d
Compare
Resolves: ZSV-11559 Change-Id: I7274786b636c6d716e7773666170756e6a786d72
3d34c2d to
a561762
Compare
APIImpact
Resolves: ZSV-11559
Change-Id: I70637377776e777070676c6a6c616e74786b6667
sync from gitlab !9612