KVM: fix host.volume.encryption always false with qemu-img >= 10.1 (help header changed) [4.22]#13587
Open
nikolauseppinger wants to merge 1 commit into
Conversation
qemu-img 10.1.0 changed the "qemu-img --help" supported-formats header from "Supported formats:" to "Supported image formats:". The regex in QemuImg.helpSupportsImageFormat() only matched the old header, so hostSupportsVolumeEncryption() returned false on affected hosts even though cryptsetup and the luks format were both available, blocking encrypted offerings. Make the "image" keyword optional in the regex so it matches both the legacy and current qemu-img help output.
Member
|
thanks @nikolauseppinger I have closed #13583 |
Member
|
@blueorangutan package |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13587 +/- ##
==========================================
Coverage 17.67% 17.67%
+ Complexity 15797 15794 -3
==========================================
Files 5923 5925 +2
Lines 533372 533483 +111
Branches 65256 65256
==========================================
+ Hits 94253 94273 +20
- Misses 428460 428553 +93
+ Partials 10659 10657 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #13583 to the 4.22 branch.
Fixes KVM volume encryption detection on hosts with qemu-img >= 10.1.0.
QEMU changed the
qemu-img --helpsupported-formats header from"Supported formats:" to "Supported image formats:" in 10.1.0. The detection
regex in
QemuImg.helpSupportsImageFormat()no longer matched, sohostSupportsVolumeEncryption()returned false andhost.volume.encryptionwas stored as false, blocking encrypted offerings on affected hosts (e.g.
RHEL 9.8 shipping qemu-img 10.1.0).
The regex now treats the "image" keyword as optional and is covered by unit
tests for both the legacy and the new header, plus a negative case.
Cherry-picked cleanly from main (commit cd1c427) onto 4.22, no conflicts.
Types of changes
Bug Severity