Skip to content

Fix KBOSS backup creation edge case - #13880

Open
JoaoJandre wants to merge 2 commits into
apache:mainfrom
scclouds:fix-kboss-edge-case
Open

Fix KBOSS backup creation edge case#13880
JoaoJandre wants to merge 2 commits into
apache:mainfrom
scclouds:fix-kboss-edge-case

Conversation

@JoaoJandre

Copy link
Copy Markdown
Contributor

Description

If a new incremental backup is created for a stopped VM, that has a delta tree with more than one branch for one of its volumes, and the VM snapshot following the last backup is the current one, a problem occurs during backup creation where the current VM snapshot delta is not rebased to its new parent, causing subsequent backups to fail and the chain to become inconsistent.

This PR fixes this issue.

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?

Test description

With a stopped VM, the following tests were performed:

Test Previous result Result with patch
Take a backup, a VM snapshot, and a new backup Success and consistent chain Success and consistent chain
Take a backup, two consecutive VM snapshots, revert to the first VM snapshot, take a new VM snapshot, and then take a new backup Success and consistent chain Success and consistent chain
Take a backup, two consecutive VM snapshots, revert to the first VM snapshot, and then take a new backup Success, but the chain becomes inconsistent, making it impossible to start the VM Success and consistent chain

@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@winterhazel if we have a new RC could we include this?
Otherwise, this can go to the next minor.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 19.65%. Comparing base (dbee809) to head (8a6889d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../apache/cloudstack/backup/KbossBackupProvider.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #13880   +/-   ##
=========================================
  Coverage     19.64%   19.65%           
- Complexity    19784    19795   +11     
=========================================
  Files          6368     6368           
  Lines        574889   574889           
  Branches      70353    70353           
=========================================
+ Hits         112935   112986   +51     
+ Misses       449684   449633   -51     
  Partials      12270    12270           
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 20.92% <50.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@winterhazel

Copy link
Copy Markdown
Member

@winterhazel if we have a new RC could we include this? Otherwise, this can go to the next minor.

@JoaoJandre 4.23 will not have any minor. I will include it in RC3.

@winterhazel

Copy link
Copy Markdown
Member

@blueorangutan package

@winterhazel winterhazel added this to the 4.23.0 milestone Aug 17, 2026
@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache 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.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 18882

@JoaoJandre

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@JoaoJandre 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.

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

@blueorangutan

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants