cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

Fix volume snapshot physical size after migration between secondary storages

Open hsato03 opened this issue 1 month ago • 16 comments

Description

When migrating a volume snapshot from one secondary storage to another using the migrateSecondaryStorageData and migrateResourceToAnotherSecondaryStorage APIs, its physical size is set to 0.

This behavior was changed to preserve the physical size of the snapshot after migration.

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [X] 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
  • [X] Minor
  • [ ] Trivial

Screenshots (if appropriate):

How Has This Been Tested?

I migrated a volume snapshot using the migrateSecondaryStorageData and migrateResourceToAnotherSecondaryStorage APIs and verified that its physical size had not changed.

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

hsato03 avatar Nov 28 '25 14:11 hsato03

@blueorangutan package

hsato03 avatar Nov 28 '25 14:11 hsato03

@hsato03 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 avatar Nov 28 '25 14:11 blueorangutan

Codecov Report

:x: Patch coverage is 0% with 1 line in your changes missing coverage. Please review. :white_check_mark: Project coverage is 16.18%. Comparing base (e4414d1) to head (dc7c20d).

Files with missing lines Patch % Lines
...ack/storage/image/SecondaryStorageServiceImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #12166      +/-   ##
============================================
- Coverage     16.18%   16.18%   -0.01%     
- Complexity    13300    13301       +1     
============================================
  Files          5657     5657              
  Lines        498478   498478              
  Branches      60501    60501              
============================================
- Hits          80668    80664       -4     
- Misses       408827   408830       +3     
- Partials       8983     8984       +1     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.03% <0.00%> (-0.01%) :arrow_down:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Nov 28 '25 14:11 codecov[bot]

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

blueorangutan avatar Nov 28 '25 15:11 blueorangutan

@blueorangutan test

DaanHoogland avatar Dec 03 '25 07:12 DaanHoogland

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

blueorangutan avatar Dec 03 '25 07:12 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar Dec 03 '25 22:12 blueorangutan

@hsato03 should this go in 4.20 branch?

shwstppr avatar Dec 04 '25 07:12 shwstppr

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Dec 04 '25 14:12 github-actions[bot]

@hsato03 should this go in 4.20 branch?

Sure, I changed the base branch to 4.20.

hsato03 avatar Dec 04 '25 14:12 hsato03

@blueorangutan package

DaanHoogland avatar Dec 08 '25 09:12 DaanHoogland

@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 avatar Dec 08 '25 09:12 blueorangutan

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

blueorangutan avatar Dec 08 '25 10:12 blueorangutan

@blueorangutan test

DaanHoogland avatar Dec 08 '25 10:12 DaanHoogland

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

blueorangutan avatar Dec 08 '25 10:12 blueorangutan

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

Test Result Time (s) Test File
test_uservm_host_control_state Failure 17.08 test_host_control_state.py
test_01_sys_vm_start Failure 0.10 test_secondary_storage.py
test_03_secured_to_nonsecured_vm_migration Error 399.71 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 0.01 test_vm_life_cycle.py

blueorangutan avatar Dec 09 '25 03:12 blueorangutan