[libvirt] [PATCH] qemu: Always set auth_supported for Ceph disks.

Recently the Ceph project defaulted auth_supported from 'none' to 'cephx'. When no auth information was set for Ceph disks this would lead to librados defaulting to 'cephx', but there would be no additional authorization information. We now explicitly set auth_supported to none when passing down arguments to Qemu. Signed-off-by: Wido den Hollander <wido@widodh.nl> --- src/qemu/qemu_command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6549f57..1c59695 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1782,6 +1782,8 @@ qemuBuildRBDString(virConnectPtr conn, disk->auth.username); goto error; } + } else { + virBufferAddLit(opt, ":auth_supported=none"); } if (disk->nhosts > 0) { -- 1.7.9.5

On Mon, Jun 25, 2012 at 05:44:01PM +0200, Wido den Hollander wrote:
Recently the Ceph project defaulted auth_supported from 'none' to 'cephx'.
When no auth information was set for Ceph disks this would lead to librados defaulting to 'cephx', but there would be no additional authorization information.
We now explicitly set auth_supported to none when passing down arguments to Qemu.
Signed-off-by: Wido den Hollander <wido@widodh.nl> --- src/qemu/qemu_command.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6549f57..1c59695 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1782,6 +1782,8 @@ qemuBuildRBDString(virConnectPtr conn, disk->auth.username); goto error; } + } else { + virBufferAddLit(opt, ":auth_supported=none"); }
if (disk->nhosts > 0) {
That makes sense, yes, ACK, i'm pushing this ! thanks, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Thu, Jul 05, 2012 at 05:07:17PM +0800, Daniel Veillard wrote:
On Mon, Jun 25, 2012 at 05:44:01PM +0200, Wido den Hollander wrote:
Recently the Ceph project defaulted auth_supported from 'none' to 'cephx'.
When no auth information was set for Ceph disks this would lead to librados defaulting to 'cephx', but there would be no additional authorization information.
We now explicitly set auth_supported to none when passing down arguments to Qemu.
Signed-off-by: Wido den Hollander <wido@widodh.nl> --- src/qemu/qemu_command.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 6549f57..1c59695 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1782,6 +1782,8 @@ qemuBuildRBDString(virConnectPtr conn, disk->auth.username); goto error; } + } else { + virBufferAddLit(opt, ":auth_supported=none"); }
if (disk->nhosts > 0) {
That makes sense, yes, ACK, i'm pushing this !
I also had to commit the following since this broke "make check" ! Fix one test regression on auth Ceph support The extra data need to be added to one test case diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.args index 706ba89..69cf7c7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.args @@ -2,6 +2,6 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \ /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor \ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -drive \ file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0 -drive \ -file=rbd:pool/image:\ +file=rbd:pool/image:auth_supported=none:\ mon_host=mon1.example.org\:6321\;mon2.example.org\:6322\;mon3.example.org\:6322,\ if=virtio,format=raw -net none -serial none -parallel none -usb -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
Wido den Hollander