Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
746e1cce
Commit
746e1cce
authored
8 years ago
by
Guido Günther
Browse files
Options
Downloads
Patches
Plain Diff
qemu: Fix the command line generation for rbd auth using aes secrets
Closes: #827164
parent
3ce2f869
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/qemu-Fix-the-command-line-generation-for-rbd-auth-using-a.patch
+55
-0
55 additions, 0 deletions
...ix-the-command-line-generation-for-rbd-auth-using-a.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
56 additions
and
0 deletions
debian/patches/qemu-Fix-the-command-line-generation-for-rbd-auth-using-a.patch
0 → 100644
+
55
−
0
View file @
746e1cce
From: John Ferlan <jferlan@redhat.com>
Date: Tue, 16 Aug 2016 16:50:15 -0400
Subject: qemu: Fix the command line generation for rbd auth using aes secrets
https://bugzilla.redhat.com/show_bug.cgi?id=1182074
Since libvirt still uses a legacy qemu arg format to add a disk, the
manner in which the 'password-secret' argument is passed to qemu needs
to change to prepend a 'file.' If in the future, usage of the more
modern disk format, then the prepended 'file.' can be removed.
Fix based on Jim Fehlig <jfehlig@suse.com> posting and subsequent
upstream list followups, see:
http://www.redhat.com/archives/libvir-list/2016-August/msg00777.html
for details. Introduced by commit id 'a1344f70'.
Closes: #827164
---
src/qemu/qemu_command.c | 7 ++++++-
.../qemuxml2argv-disk-drive-network-rbd-auth-AES.args | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 5325f48..2b619a5 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1296,7 +1296,12 @@
qemuBuildDriveSourceStr(virDomainDiskDefPtr disk,
virBufferAddLit(buf, ",");
if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES) {
- virBufferAsprintf(buf, "password-secret=%s,",
+ /* NB: If libvirt starts using the more modern option based
+ * syntax to build the command line (e.g., "-drive driver=rbd,
+ * filename=%s,...") instead of the legacy model (e.g."-drive
+ * file=%s,..."), then the "file." prefix can be removed
+ */
+ virBufferAsprintf(buf, "file.password-secret=%s,",
secinfo->s.aes.alias);
}
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args
index 5034bb7..07d01b6 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args
@@ -26,7 +26,7 @@
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
-drive 'file=rbd:pool/image:id=myname:auth_supported=cephx\;none:\
mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:\
-6322,password-secret=virtio-disk0-secret0,format=raw,if=none,\
+6322,file.password-secret=virtio-disk0-secret0,format=raw,if=none,\
id=drive-virtio-disk0' \
-device virtio-blk-pci,bus=pci.0,addr=0x3,drive=drive-virtio-disk0,\
id=virtio-disk0
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
746e1cce
...
...
@@ -14,3 +14,4 @@ Allow-access-to-libnl-3-config-files.patch
debian/apparmor_profiles_local_include.patch
virt-aa-helper-apparmor-allow-usr-share-OVMF-too.patch
Set-defaults-for-zfs-tools.patch
qemu-Fix-the-command-line-generation-for-rbd-auth-using-a.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment