Skip to content

<fix>[pci-device]: revert duplicate mdev ref cleanup - #4722

Open
ZStack-Robot wants to merge 1 commit into
5.4.12from
sync/yaohua.wu/bugfix/ZSTAC-86456@@2
Open

<fix>[pci-device]: revert duplicate mdev ref cleanup#4722
ZStack-Robot wants to merge 1 commit into
5.4.12from
sync/yaohua.wu/bugfix/ZSTAC-86456@@2

Conversation

@ZStack-Robot

Copy link
Copy Markdown
Collaborator

ZSTAC-86456

Root Cause

The migration cleanup uses auto-increment id ordering to choose the effective mdev spec. The ID reflects the original reporting order and does not identify the currently active spec, so the cleanup can disable the spec that still has generated mdev devices.

Changes

Module Change
conf/db/upgrade Revert the 66-line mdev reference cleanup introduced by b61dcd2442.

Verification

  • git diff --check passed.
  • Independent comparison confirmed the diff is the complete inverse of b61dcd2442 with no unrelated changes.

Related MRs

  • Premium MR will use the paired bugfix/ZSTAC-86456@@2 branch.

Related: ZSTAC-86456

sync from gitlab !10778

Revert the schema cleanup added for ZSTAC-86456.

1. Why?
The cleanup compares auto-increment IDs to choose the effective mdev
spec, but ID order does not represent the currently active spec.

2. How?
Remove the migration block introduced by b61dcd2.

3. Side effects?
Duplicate references are no longer cleaned during the 5.4.12 upgrade.
The linked issues are reopened for a corrected solution.

# Summary of changes (by module):
- db upgrade: remove the unsafe mdev reference cleanup.

Related: ZSTAC-86456
Reverts: b61dcd2
Change-Id: I9cc698b3bf18d0e91bca16aaa12d5754d10db3d1
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 24 minutes.

View limit details

Limit details: You’ve used the included review currently available. Your 60 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

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).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4007ce9a-49d7-4bc8-b543-f20771c9771e

📥 Commits

Reviewing files that changed from the base of the PR and between b25f55b and 3dbafa7.

📒 Files selected for processing (1)
  • conf/db/upgrade/V5.4.12__schema.sql

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 timed out.
⚙️ 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

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

@zstack-robot-2

Copy link
Copy Markdown
Collaborator

Comment from yaohua.wu:

Review: MR !10778 — ZSTAC-86456

Background (preserved across rounds)

  • Jira: ZSTAC-86456 — backport of duplicate mdev reference handling
  • Bug summary: The reverted migration chose an effective mdev spec by auto-increment ID order, which does not represent the active spec.
  • Intent & scope: Revert the 66-line SQL cleanup from zstack !10600 on branch 5.4.12.
  • Round 1 initial findings: 0 × P0, 0 × P1.
  • Suggested fix direction: No additional change required for this revert MR.

Findings

No actionable findings.

Coverage

  • Reviewed 1/1 changed file; 0 generated files skipped.
  • The deletion matches the complete 66-line addition from b61dcd2442.
  • git diff --check passed; automated tests were not rerun for this exact revert.

Verdict: APPROVED

The MR is a focused revert with no unrelated changes.


🤖 Robot Reviewer

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