Skip to content

(KBOSS) Add synchronous backup compression flag - #13901

Open
JoaoJandre wants to merge 3 commits into
apache:mainfrom
scclouds:add-sync-compression-flag
Open

(KBOSS) Add synchronous backup compression flag#13901
JoaoJandre wants to merge 3 commits into
apache:mainfrom
scclouds:add-sync-compression-flag

Conversation

@JoaoJandre

Copy link
Copy Markdown
Contributor

Description

Currently, the backup compression process is always performed asynchronously; the existing backup is compressed into a new file, which then replaces the original. However, when using immutable storage, this behavior increases storage usage because the original backup file cannot be deleted.

To address this, the compress_async flag, defaulting to true, has been added to backup offerings. The default setting maintains the current behavior. When the flag is set to false, compression occurs during backup creation, resulting in only a single file copy. However, enabling synchronous backup compression slows down the backup creation process and makes it prone to timeouts unless the timeout settings are adjusted accordingly.

It is important to note that the flag only applies to backup offerings that have the compress flag set to true.

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

  1. I created a new backup offering with compressasync = false, and another without specifying compressasync.
  2. I created the "sync" and "async" VMs and assigned the respective offerings to each VM.
  3. I created backups using each of the VMs. I observed that the backups created with the "async" VM maintained the previous behavior, whereas the backups created with the "sync" VM were compressed during creation.

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 11.94030% with 59 lines in your changes missing coverage. Please review.
✅ Project coverage is 19.64%. Comparing base (dbee809) to head (b374d73).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ache/cloudstack/backup/TakeKbossBackupCommand.java 4.00% 24 Missing ⚠️
.../apache/cloudstack/backup/KbossBackupProvider.java 15.78% 14 Missing and 2 partials ⚠️
...java/org/apache/cloudstack/utils/qemu/QemuImg.java 0.00% 10 Missing ⚠️
.../wrapper/LibvirtTakeKbossBackupCommandWrapper.java 37.50% 5 Missing ⚠️
...i/command/user/backup/CreateBackupOfferingCmd.java 0.00% 3 Missing ⚠️
...e/wrapper/LibvirtCompressBackupCommandWrapper.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #13901   +/-   ##
=========================================
  Coverage     19.64%   19.64%           
- Complexity    19784    19789    +5     
=========================================
  Files          6368     6368           
  Lines        574889   574939   +50     
  Branches      70353    70359    +6     
=========================================
+ Hits         112935   112961   +26     
- Misses       449684   449708   +24     
  Partials      12270    12270           
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 20.92% <11.94%> (+<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.

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.

1 participant