Skip to content

ZSTAC-75952 set first created zone as default#4443

Open
MatheMatrix wants to merge 1 commit into
5.5.28from
sync/hanyu.liang/fix-75952
Open

ZSTAC-75952 set first created zone as default#4443
MatheMatrix wants to merge 1 commit into
5.5.28from
sync/hanyu.liang/fix-75952

Conversation

@MatheMatrix

Copy link
Copy Markdown
Owner

Root Cause

When APICreateZoneMsg omits isDefault, ZoneManagerImpl initialized the zone as non-default and skipped the default-zone operation queue. As a result, the first manually or Wizard-created zone could remain non-default.

Fix

  • Route zone creation with omitted isDefault through the default-zone queue.
  • Mark the zone as default only when no active zone exists.
  • Backfill one default zone during 5.5.28 upgrade if existing deployments have zones but no default zone.
  • Add ZoneCase coverage for first zone creation without isDefault.

Verification

  • compute module offline install passed.
  • ZoneCase passed.
  • SQL backfill procedure validated on a scratch zstack schema.

Resolves: ZSTAC-75952

sync from gitlab !10404

@coderabbitai

coderabbitai Bot commented Jul 3, 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: 24 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: f1365502-36e1-436e-8438-4d441557d599

📥 Commits

Reviewing files that changed from the base of the PR and between a2492ae and c296180.

📒 Files selected for processing (3)
  • compute/src/main/java/org/zstack/compute/zone/ZoneManagerImpl.java
  • conf/db/upgrade/V5.5.28__schema.sql
  • test/src/test/groovy/org/zstack/test/integration/compute/ZoneCase.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/hanyu.liang/fix-75952

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

@zstack-robot-2

Copy link
Copy Markdown
Collaborator

Comment from gitlab:

检测到该PR状态为cannot_be_merged, 所以移除了REVIEWED标签

When isDefault is omitted, zone creation now enters the
default-zone queue. If no zone exists, the new zone becomes
default before persistence.

Backfill one default zone during 5.5.28 upgrade for deployments
where zones already exist but none is marked default.

DBImpact

Test: ZoneCase
Test: SQL backfill on scratch schema

Resolves: ZSTAC-75952

Change-Id: Ia4844f7a37d823508d16a74f06ec2333f50b4d07
@MatheMatrix MatheMatrix force-pushed the sync/hanyu.liang/fix-75952 branch from 662d0c0 to c296180 Compare July 6, 2026 05:38
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.

3 participants