<fix>[storage]: ZSTAC-87684 prepare zbs hosts on attach - #4688
<fix>[storage]: ZSTAC-87684 prepare zbs hosts on attach#4688zstack-robot-2 wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 22 minutes Limit details: You’ve used the included review currently available. Your 95 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Warning
|
| Layer / File(s) | Summary |
|---|---|
主存储挂载钩子storage/src/main/java/org/zstack/storage/addon/primary/ExternalPrimaryStorage.java |
新增 attachHook。方法筛选已连接且非维护状态的主机,部署客户端,并在部署成功后激活心跳卷。 |
挂载流程集成验证test/src/test/integration/storage/primary/addon/zbs/ZbsPrimaryStorageCase.groovy |
新增成功挂载、维护主机跳过、客户端部署失败和心跳卷激活失败测试,并清理模拟器处理器。 |
Estimated code review effort: 3 (Moderate) | ~25 minutes
Merge Risk: ⚪ Minimal · up to e418c
The change prepares eligible ZBS hosts before attach completes and fails attach on preparation errors; no actionable merge-blocking risk remains at the current head, so it is merge-ready after normal checks and review.
Sequence Diagram(s)
sequenceDiagram
participant 主存储挂载
participant 集群主机查询
participant 客户端部署
participant 心跳卷
主存储挂载->>集群主机查询: 查询可用主机
主存储挂载->>客户端部署: 部署客户端
客户端部署-->>主存储挂载: 返回部署结果
主存储挂载->>心跳卷: 激活心跳卷
心跳卷-->>主存储挂载: 返回激活结果
Poem
我是小兔,蹦过主机行,
维护节点安静旁观。
客户端部署齐步走,
心跳卷亮起月光。
失败即刻回报,挂载稳稳收场。
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题准确概括了在挂载时准备 ZBS 主机的主要变更。 |
| Description check | ✅ Passed | 描述说明了回移目的、代码变更、失败行为和测试状态,与变更内容相关。 |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| 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/haidong.pang/fix/ZSTAC-87684
Comment @coderabbitai help to get the list of available commands.
|
Comment from gitlab: 自上次添加REVIEWED标签(2026-08-18 18:30:55.000Z)后, 有新的COMMIT更新(2026-08-19 11:06:00.927Z), 所以移除了REVIEWED标签 |
Resolves: ZSTAC-85462 Change-Id: Iba5d8a7f144cdaf367030867d202887f99eef77e
7b95366 to
906be64
Compare
Summary
Backport zstack !9991 from
5.5.22to5.4.12forZSTAC-87684.Fix external/ZBS primary storage attach so connected, non-maintenance KVM hosts in the target cluster are prepared before attach succeeds.
Changes
9022e987c21cb8e5edc5b5689570a1deb8004d85.ExternalPrimaryStorage.attachHook(...).5.4.12.Testing
git diff --check upstream/5.4.12..HEADZbsPrimaryStorageCase.testPrepareHostsWhenAttachPrimaryStorageToClusterOriginal issue: ZSTAC-85462
Resolves: ZSTAC-87684
sync from gitlab !10741