Skip to content

<fix>[compute]: update#3349

Open
zstack-robot-2 wants to merge 1 commit into5.5.6from
sync/jin.shen/fix-test
Open

<fix>[compute]: update#3349
zstack-robot-2 wants to merge 1 commit into5.5.6from
sync/jin.shen/fix-test

Conversation

@zstack-robot-2
Copy link
Collaborator

Resolves: ZSTAC-1234

Change-Id: I746e63786a677676676b6d6265657063666b7677

sync from gitlab !9178

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

Walkthrough

VmInstanceBase 中新增私有方法 syncVmDevicesAddressInfo(String vmUuid),并在多处虚拟机生命周期路径(启动、重启、恢复等)状态转换后调用该方法,通过向主机发送 SyncVmDeviceInfoMsg 同步 VM 设备地址信息并记录结果。

Changes

Cohort / File(s) Summary
VM 设备同步增强
compute/src/main/java/org/zstack/compute/vm/VmInstanceBase.java
添加私有方法 syncVmDevicesAddressInfo(String vmUuid);在若干 VM 生命周期路径(InstantStart 启动路径、普通启动、重启完成、恢复完成、创建后即时启动等)调用该方法以向主机发送 SyncVmDeviceInfoMsg 并在回调中记录成功或警告失败。

Sequence Diagram(s)

sequenceDiagram
participant VM as VM Instance
participant Manager as VmInstanceBase
participant Host as Host Agent
participant MsgBus as Message Bus

VM->>Manager: 状态转为 Running / 完成重启/恢复
Manager->>MsgBus: 构造并发送 SyncVmDeviceInfoMsg(vmUuid)
MsgBus->>Host: 转发 SyncVmDeviceInfoMsg
Host-->>MsgBus: 执行同步并返回结果
MsgBus-->>Manager: 同步成功/失败 回调
Manager-->>VM: 记录日志(成功/警告)
Loading

代码审查工作量估计

🎯 2 (Simple) | ⏱️ ~12 分钟

我是小兔去巡山,🐇
器件地址要对盘,
一条消息轻轻发,
主机与虚机手牵手,
同步完成好欢颜 ✨


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (6 files):

⚔️ compute/src/main/java/org/zstack/compute/vm/VmInstanceBase.java (content)
⚔️ conf/db/upgrade/V5.5.6__schema.sql (content)
⚔️ identity/src/main/java/org/zstack/identity/QuotaUtil.java (content)
⚔️ longjob/src/main/java/org/zstack/longjob/LongJobManagerImpl.java (content)
⚔️ network/src/main/java/org/zstack/network/service/DhcpExtension.java (content)
⚔️ sdk/src/main/java/org/zstack/sdk/GpuAllocateStatus.java (content)

These conflicts must be resolved before merging into 5.5.6.
Resolve conflicts locally and push changes to this branch.
Title check ❓ Inconclusive The pull request title "[compute]: update" is vague and generic, failing to convey meaningful information about the actual changes made to synchronize VM device address information. Replace the title with a more descriptive one that clearly summarizes the main change, such as "[compute]: Sync VM device address information on state transitions".
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description includes a JIRA reference and sync notes that relate to the changeset context, demonstrating relevance to the PR purpose.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sync/jin.shen/fix-test
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch sync/jin.shen/fix-test
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉

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.40.5)
compute/src/main/java/org/zstack/compute/vm/VmInstanceBase.java

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

Resolves: ZSTAC-1234

Change-Id: I746e63786a677676676b6d6265657063666b7677
@MatheMatrix MatheMatrix force-pushed the sync/jin.shen/fix-test branch from 92e6937 to 0bc3ba4 Compare February 13, 2026 08:39
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.

1 participant