Skip to content

<fix>[management-network]: fix callback endpoint selection - #4653

Open
MatheMatrix wants to merge 1 commit into
feature-5.5.28-management-dual-stackfrom
sync/zstackio/shixin-ZSTAC-86635@@2
Open

<fix>[management-network]: fix callback endpoint selection#4653
MatheMatrix wants to merge 1 commit into
feature-5.5.28-management-dual-stackfrom
sync/zstackio/shixin-ZSTAC-86635@@2

Conversation

@MatheMatrix

Copy link
Copy Markdown
Owner

Jira: ZSTAC-86635

Changes

  • Resolve a remote hostname once, then use the selected numeric address for connection and the initiating MN endpoint of the same address family for callback.
  • Apply this to generic async REST, KVM callback/deployment, and Ansible.
  • Reject hostname-based asynchronous HTTPS requests because replacing the hostname would change TLS SNI and certificate identity.

Validation

  • mvn install -DskipTests in utils and core
  • PlatformManagementEndpointSelectionTest: 13 passed
  • AnsibleRunnerTargetAwareArgumentsTest: 1 passed
  • git diff --check: passed

DualStackAddKvmHostCase is blocked before the changed path by an existing StaticIpOperator startup NPE.

sync from gitlab !10628

Resolve hostnames once and keep callback address family aligned.

Resolves: ZSTAC-86635

Change-Id: Ie4a0247e78f4f557e32df0eae491a2ebe8d45a72
@coderabbitai

coderabbitai Bot commented Jul 27, 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: 4 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: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)

Review profile: CHILL

Plan: Pro

Run ID: e9908cad-58b8-4d9a-befd-0c5d6a167034

📥 Commits

Reviewing files that changed from the base of the PR and between 843042b and eb24c9f.

📒 Files selected for processing (7)
  • core/src/main/java/org/zstack/core/Platform.java
  • core/src/main/java/org/zstack/core/ansible/AnsibleRunner.java
  • core/src/main/java/org/zstack/core/rest/RESTFacadeImpl.java
  • plugin/kvm/src/main/java/org/zstack/kvm/KVMHost.java
  • test/src/test/groovy/org/zstack/test/integration/core/PlatformManagementEndpointSelectionTest.groovy
  • test/src/test/groovy/org/zstack/test/integration/core/ansible/AnsibleRunnerTargetAwareArgumentsTest.groovy
  • utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/zstackio/shixin-ZSTAC-86635@@2

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

@zstack-robot-2

Copy link
Copy Markdown
Collaborator

Comment from shixin.ruan:

The two failed UnitTest cases were caused by the paired premium MR !14883, not by this zstack MR. BaremetalPxeServerBase overwrote the simulator URL host and sent PXE init requests to the fixture IP 192.168.0.200:8989.

premium !14883 has been updated at e196bc1a068d6504636a57d60c88bd6ad1f5b6d8. On root@172.20.13.240, the full premium build passed and both failed cases passed (BareMetal2GatewayCase 23s, BareMetal2GatewayMonitorGroupCase 6s). No zstack-side code change is required for this failure.

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