Skip to content

Check Qcow2 version before using --bitmaps #10896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JoaoJandre
Copy link
Contributor

Description

This PR adds a validation on the volume copy process. Before adding the --bitmaps flag to the convert command, a check is made in the volume to guarantee that the volume is at least version 3; if it is not, the flag is not added.

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?

Upload image with old compat version, e.g. http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2, attach to VM, stop VM, migrate volume.

Before:

Failed to convert [/mnt/b59eff0f-5b97-37ed-a513-9e1983d1d19b/2784ec51-4776-4b03-9a85-198c465e7d25] to [/mnt/a66f48f5-13c6-3676-b320-a15d32bbf32f/2784ec51-4776-4b03-9a85-198c465e7d25] due to: [qemu-img: Source lacks bitmap support]. org.apache.cloudstack.utils.qemu.QemuImgException: qemu-img: Source lacks bitmap support

After:
Image is converted successfully as the --bitmaps option is not informed.

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

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

Copy link

codecov bot commented May 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Project coverage is 17.40%. Comparing base (96b8e23) to head (ca34e88).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...dstack/storage/formatinspector/Qcow2Inspector.java 0.00% 14 Missing ⚠️
...java/org/apache/cloudstack/utils/qemu/QemuImg.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #10896      +/-   ##
============================================
+ Coverage     16.52%   17.40%   +0.87%     
+ Complexity    13802    13801       -1     
============================================
  Files          5717     5312     -405     
  Lines        506302   473439   -32863     
  Branches      61440    55609    -5831     
============================================
- Hits          83690    82386    -1304     
+ Misses       413235   381826   -31409     
+ Partials       9377     9227     -150     
Flag Coverage Δ
uitests ?
unittests 17.40% <0.00%> (-0.01%) ⬇️

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

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

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

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

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_08_arping_in_ssvm Failure 5.51 test_diagnostics.py
test_09_arping_in_cpvm Failure 5.26 test_diagnostics.py
test_18_retrieve_cpvm_single_file Failure 129.48 test_diagnostics.py
test_create_pvlan_network Error 0.11 test_pvlan.py

@JoaoJandre
Copy link
Contributor Author

[SF] Trillian test result (tid-13366) Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8 Total time taken: 55694 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10896-t13366-kvm-ol8.zip Smoke tests completed. 139 look OK, 2 have errors, 0 did not run Only failed and skipped tests results shown below:
Test Result Time (s) Test File
test_08_arping_in_ssvm Failure 5.51 test_diagnostics.py
test_09_arping_in_cpvm Failure 5.26 test_diagnostics.py
test_18_retrieve_cpvm_single_file Failure 129.48 test_diagnostics.py
test_create_pvlan_network Error 0.11 test_pvlan.py

Looking at the logs, three of them seem network related. While I don't understand the failure on test_18_retrieve_cpvm_single_file; it seems like an issue with the test itself (the command returned a URL but it was not what the test was expecting). In any case, none of the failures seem to be caused by this change.

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm

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.

3 participants