]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu/rbd: improve rbd device specification
authorSage Weil <sage@newdream.net>
Tue, 1 Nov 2011 01:29:07 +0000 (18:29 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 16 Nov 2011 00:06:42 +0000 (17:06 -0700)
commit5745dc123a4798db36dd0c78c764cc29a9cf71ce
treef990a231c9451f56a97e06e01c4e4ba83f6bf0ac
parent0f590c62b2af15247cafc2cc53815a7edbf5532e
qemu/rbd: improve rbd device specification

This improves the support for qemu rbd devices by adding support for a few
key features (e.g., authentication) and cleaning up the way in which
rbd configuration options are passed to qemu.

An <auth> member of the disk source xml specifies how librbd should
authenticate. The username attribute is the Ceph/RBD user to authenticate as.
The usage or uuid attributes specify which secret to use. Usage is an
arbitrary identifier local to libvirt.

The old RBD support relied on setting an environment variable to
communicate information to qemu/librbd.  Instead, pass those options
explicitly to qemu.  Update the qemu argument parsing and tests
accordingly.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/qemu/qemu_command.c
tests/qemuargv2xmltest.c
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-auth.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.args [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml [new file with mode: 0644]
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.args
tests/qemuxml2argvtest.c