Skip to content

Fix Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0 - #12777

Merged
sureshanaparti merged 1 commit into
apache:4.22from
shapeblue:backup-upgrade
Apr 10, 2026
Merged

Fix Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0#12777
sureshanaparti merged 1 commit into
apache:4.22from
shapeblue:backup-upgrade

Conversation

@abh1sar

@abh1sarabh1sar commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes#12769

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  1. Created 4 data volumes on 4.20.
  2. Took a backup
  3. Upgrade to 4.22

Also tried running the new query manually on backed-up volumes containing data of 24 volumes.

How did you try to break this feature and the system with this change?

@abh1sar

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@codecov

codecovBot commented Mar 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.92%. Comparing base (5caf6cd) to head (fdc1e5f).
⚠️ Report is 49 commits behind head on 4.22.

Additional details and impacted files
@@ Coverage Diff @@## 4.22 #12777 +/- ##
============================================
+ Coverage 17.60% 17.92% +0.31% - Complexity 15659 16179 +520 
============================================
Files 5917 5949 +32 Lines 531394 534058 +2664 Branches 64970 65301 +331 ============================================
+ Hits 93575 95752 +2177 - Misses 427269 427550 +281 - Partials 10550 10756 +206 
FlagCoverage Δ
uitests3.66% <ø> (-0.04%)⬇️
unittests19.03% <ø> (+0.35%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17059

@abh1sar
abh1sar changed the base branch from main to 4.22March 10, 2026 06:59
@abh1sar

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@abh1sar a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17061

@abh1sar
abh1sar marked this pull request as ready for review March 10, 2026 11:33
@shwstppr
shwstppr requested a review from CopilotMarch 26, 2026 11:28

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses an upgrade-time failure in the 4.20.1/4.20.2 → 4.21.0/4.22.0 database migration when the backup framework is in use, by eliminating reliance on GROUP_CONCAT() string-building that can exceed group_concat_max_len.

Changes:

  • Replaces manual JSON string concatenation using GROUP_CONCAT() with JSON_ARRAYAGG(JSON_OBJECT(...)) when backfilling backed_volumes in cloud.backups.
  • Applies the same change when backfilling backup_volumes in cloud.vm_instance, defaulting to '[]' for VMs with no volumes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sureshanapartisureshanaparti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@abh1sar

Copy link
Copy Markdown
ContributorAuthor

@sureshanaparti@vladimirpetrov
This is a must have for 4.22.1. Thanks

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17418

@rajujithrajujith left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Tested upgrade from 4.20.2 to this PR
VMs had 3 volumes and backups on NAS repo

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-15838)
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 50052 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12777-t15838-kvm-ol8.zip
Smoke tests completed. 149 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

@sureshanaparti
sureshanaparti merged commit 4ba4bd3 into apache:4.22Apr 10, 2026
25 of 32 checks passed
@github-project-automationgithub-project-automationBot moved this from In Progress to Done in Apache CloudStack 4.22.1Apr 10, 2026
@sureshanaparti
sureshanaparti deleted the backup-upgrade branch April 10, 2026 04:09
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0

7 participants

@abh1sar@blueorangutan@DaanHoogland@rajujith@sureshanaparti@vladimirpetrov