Skip to content

kvm: fix backup volume snapshot fails on RBD storage - #6790

Merged
yadvr merged 4 commits into
apache:mainfrom
weizhouapache:4.18-fix-volume-snapshot-on-rbd
Oct 8, 2022
Merged

kvm: fix backup volume snapshot fails on RBD storage#6790
yadvr merged 4 commits into
apache:mainfrom
weizhouapache:4.18-fix-volume-snapshot-on-rbd

Conversation

@weizhouapache

Copy link
Copy Markdown
Member

Description

This PR fixes the issue that volume snapshot fails on RBD storage with the following error

qemu-img: Could not open 'driver=raw,file.filename=rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': Could not open 'rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': No such file or directory

However, it works without using image options

Therefore, do not pass the image options if the image format is not QCOW2 and LUKS.

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)

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?

volume snapshot fails on RBD storage with the following error
qemu-img: Could not open 'driver=raw,file.filename=rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': Could not open 'rbd:cloudstack/test_wei.img:mon_host=10.0.32.254:auth_supported=cephx:id=cloudstack:key=AQDwHTNjjHXRKRAAJb+AToFr6x4a1AvKUc4Ksg==:rbd_default_format=2:client_mount_timeout=30': No such file or directory
However, it works without using image options
Therefore, do not pass the image options if the image format is not QCOW2 and LUKS.
@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@mlsorensen
This PR has some changes in the file QemuImageOptions.java which was introduced by your nice PR (Volume encryption feature #6522).
can you review this PR ?

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

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

clgtm, test updated for this, though I am not clear on whether this can be tested more (unit, integration or monkey)

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a 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: ✔️ el7 ✔️ el8 ✔️ debian. SL-JID 4324

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-5060)

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4325

@weizhouapacheweizhouapache mentioned this pull request Sep 30, 2022
7 tasks
@codecov

codecovBot commented Sep 30, 2022

Copy link
Copy Markdown

Codecov Report

Merging #6790 (73efc10) into main (784578d) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@ Coverage Diff @@## main #6790 +/- ##
============================================
+ Coverage 10.52% 10.54% +0.01% - Complexity 6784 6794 +10 
============================================
Files 2464 2464 Lines 243989 244171 +182 Branches 38186 38204 +18 ============================================
+ Hits 25690 25751 +61 - Misses 215065 215170 +105 - Partials 3234 3250 +16 
Impacted FilesCoverage Δ
...apache/cloudstack/utils/qemu/QemuImageOptions.java73.07% <100.00%> (+16.55%)⬆️
.../main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java27.34% <0.00%> (-0.74%)⬇️
...n/java/com/cloud/capacity/dao/CapacityDaoImpl.java3.24% <0.00%> (-0.13%)⬇️
.../src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java0.77% <0.00%> (-0.07%)⬇️
...che/cloudstack/metrics/PrometheusExporterImpl.java0.00% <0.00%> (ø)
...e/cloudstack/metrics/PrometheusExporterServer.java0.00% <0.00%> (ø)
...c/main/java/com/cloud/user/dao/AccountDaoImpl.java30.12% <0.00%> (+2.23%)⬆️
...rg/apache/cloudstack/quota/QuotaStatementImpl.java40.26% <0.00%> (+3.98%)⬆️
...om/cloud/deploy/DeploymentPlanningManagerImpl.java27.29% <0.00%> (+4.25%)⬆️
...a/src/main/java/com/cloud/dc/ClusterDetailsVO.java61.53% <0.00%> (+7.69%)⬆️
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

weizhouapache added a commit to weizhouapache/cloudstack that referenced this pull request Oct 5, 2022
weizhouapache added a commit to weizhouapache/cloudstack that referenced this pull request Oct 5, 2022
@sonarqubecloud

Copy link
Copy Markdown

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4354

@weizhouapache

Copy link
Copy Markdown
MemberAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-5073)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44191 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6790-t5073-kvm-centos7.zip
Smoke tests completed. 102 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_08_upgrade_kubernetes_ha_clusterFailure576.69test_kubernetes_clusters.py

@yadvr
yadvr merged commit 6786c24 into apache:mainOct 8, 2022
@yadvryadvr added this to the 4.18.0.0 milestone Oct 8, 2022
@weizhouapache
weizhouapache deleted the 4.18-fix-volume-snapshot-on-rbd branch December 9, 2022 10:38
Sign up for freeto 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.

5 participants

@weizhouapache@blueorangutan@yadvr@DaanHoogland@GutoVeronezi