Skip to content

<fix>[storage]: ZSTAC-86038 recover stale XInfini image cache#4538

Open
zstack-robot-2 wants to merge 1 commit into
5.5.28from
sync/jin.ma/fix/ZSTAC-86038
Open

<fix>[storage]: ZSTAC-86038 recover stale XInfini image cache#4538
zstack-robot-2 wants to merge 1 commit into
5.5.28from
sync/jin.ma/fix/ZSTAC-86038

Conversation

@zstack-robot-2

Copy link
Copy Markdown
Collaborator

Summary

修复 XInfini 主存储的 ImageCacheVO 仍存在、但其后端 BsSnap 已丢失时,创建 vhost-root 云主机直接复用 stale cache 并报 BsSnap not found 的问题。

Changes

  • 在既有 image UUID + primary storage UUID 串行任务内,参考 Ceph cache download 逻辑检查后端 bits
  • XInfini 按 install path 精确检查 volume 或 snapshot;仅明确 404 触发普通 cache 清理与重建
  • 检查、删除遇到非 404 错误时保留 ImageCacheVO并向上传播
  • 保护 volumeSnapshotReuse://:复用快照缺失时明确失败,不删除用户源卷
  • simulator 补齐真实 BsSnap not found 行为,并增加 stale cache 自愈与复用快照安全回归场景

Testing

  • Rebase 后编译:mvn compile -pl header,storage,plugin/xinfini -am -DskipTests(24/24 modules)
  • XinfiniPrimaryStorageCase:1 test, 0 failures, 0 errors, 0 skipped
  • 真实双 MN / XInfini E2E:旧 cache xinfini://2/17239@5640 检查到 404 后重建为 xinfini://2/17302@5648,VM 成功进入 Running
  • 临时 VM/根卷已清理,双 MN 已恢复原始 JAR并确认 Running
  • CI pipeline

Resolves: ZSTAC-86038

sync from gitlab !10500

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ce6d1b36-a7b8-4659-8234-f1bd05270d3d

📥 Commits

Reviewing files that changed from the base of the PR and between 798d455 and 049cc6e.

📒 Files selected for processing (5)
  • plugin/xinfini/src/main/java/org/zstack/xinfini/XInfiniApiHelper.java
  • plugin/xinfini/src/main/java/org/zstack/xinfini/XInfiniStorageController.java
  • storage/src/main/java/org/zstack/storage/addon/primary/ExternalPrimaryStorage.java
  • test/src/test/groovy/org/zstack/test/integration/storage/primary/addon/xinfini/XinfiniPrimaryStorageCase.groovy
  • testlib/src/main/java/org/zstack/testlib/ExternalPrimaryStorageSpec.groovy

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Could not fetch remote config from http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml: TimeoutError: The operation was aborted due to timeout
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/jin.ma/fix/ZSTAC-86038

Comment @coderabbitai help to get the list of available commands.

Validate cached XInfini snapshots before reuse. Rebuild missing regular caches and preserve user-owned snapshot reuse sources.

Resolves: ZSTAC-86038

Change-Id: I88b8ac1fa8740194d735aa2c0dd139cadbd119ff
@MatheMatrix MatheMatrix force-pushed the sync/jin.ma/fix/ZSTAC-86038 branch from 50d955c to 049cc6e Compare July 10, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants