]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Fix the command line generation for rbd auth using aes secrets
authorJohn Ferlan <jferlan@redhat.com>
Tue, 16 Aug 2016 20:50:15 +0000 (16:50 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 17 Aug 2016 12:26:20 +0000 (08:26 -0400)
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'.

(cherry picked from commit d53d465083edeb64cc7b78249c030734c0d91c6b)

Resolved a couple of conflicts due to upstream commits not present
in the v2.0-maint branch

src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth-AES.args

index 71e9e637bff57c2cdb1d2058c82f16a42926df14..2ec156f78cdd9f7139ed7381653e6a3749c50aa4 100644 (file)
@@ -1233,7 +1233,7 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
         virBufferAddLit(&opt, ",");
 
         if (secinfo && secinfo->type == VIR_DOMAIN_SECRET_INFO_TYPE_AES) {
-            virBufferAsprintf(&opt, "password-secret=%s,",
+            virBufferAsprintf(&opt, "file.password-secret=%s,",
                               secinfo->s.aes.alias);
         }
 
index 7100d2d6d4343280af141364b8f9004cb28640d7..8312d3d6b847974e241c4ca194198a1ed47ec52a 100644 (file)
@@ -26,6 +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,id=drive-virtio-disk0' \
+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