Skip to content

<fix>[console]: ZSTAC-86393 delete console proxy on shutdown#4602

Open
ZStack-Robot wants to merge 1 commit into
5.4.12from
sync/yu.qiu/fix/ZSTAC-86393-5.4.12
Open

<fix>[console]: ZSTAC-86393 delete console proxy on shutdown#4602
ZStack-Robot wants to merge 1 commit into
5.4.12from
sync/yu.qiu/fix/ZSTAC-86393-5.4.12

Conversation

@ZStack-Robot

Copy link
Copy Markdown
Collaborator

Summary

Backport ZSTAC-77687 fix for ZSTAC-86393 to 5.4.12: delete console proxy when guest shutdown event is reported.

Original Fix

Testing

  • mvn compile -pl console -am -Dmaven.test.skip=true

Resolves: ZSTAC-86393

sync from gitlab !10574

Backport-to: 5.4.12

Original-Jira: ZSTAC-77687

Cherry-picked-from: e3b971f

Test: mvn compile -pl console -am -Dmaven.test.skip=true

Resolves: ZSTAC-86393

Change-Id: Iccb5fece9a27ab5e645842526de5f3f155549853
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 39590dd0-6fea-45a2-b385-bd91a87194d2

📥 Commits

Reviewing files that changed from the base of the PR and between 53153f1 and 1c902a9.

⛔ Files ignored due to path filters (1)
  • conf/springConfigXml/ConsoleManager.xml is excluded by !**/*.xml
📒 Files selected for processing (2)
  • console/src/main/java/org/zstack/console/ConsoleManagerImpl.java
  • test/src/test/groovy/org/zstack/test/integration/console/ConsoleProxyCase.groovy

Walkthrough

新增 KVM 来宾关机事件处理,使控制台后端删除对应虚拟机的控制台会话,并在集成测试中验证 ConsoleProxyVO 最终清理。

Changes

来宾关机控制台清理

Layer / File(s) Summary
来宾关机事件处理
console/src/main/java/org/zstack/console/ConsoleManagerImpl.java
ConsoleManagerImpl 实现来宾关机事件扩展点,查询虚拟机并调用控制台后端删除会话。
控制台清理集成验证
test/src/test/groovy/org/zstack/test/integration/console/ConsoleProxyCase.groovy
测试通过 CloudBus 发送来宾关机消息,并轮询验证对应 ConsoleProxyVO 数量从 1 变为 0。

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CloudBus
  participant ConsoleManagerImpl
  participant ConsoleBackend
  CloudBus->>ConsoleManagerImpl: 发送来宾关机事件
  ConsoleManagerImpl->>ConsoleManagerImpl: 查询并转换虚拟机
  ConsoleManagerImpl->>ConsoleBackend: 删除控制台会话
Loading

Poem

小兔挥耳报关机,
控制台会话悄悄离。
消息穿过 CloudBus 门,
代理归零月光明。
测试点头蹦三蹦。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题明确指出在关机时删除 console proxy,和此次变更一致。
Description check ✅ Passed 描述说明回移删除来宾关机时的控制台代理修复,并与代码和测试变更一致。
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/yu.qiu/fix/ZSTAC-86393-5.4.12

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

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