[libvirt] [RFC PATCH 0/7] Adding 'config' driver

Peter Krempa pkrempa at redhat.com
Mon Jan 20 16:41:46 UTC 2014


On 01/20/14 17:27, Daniel P. Berrange wrote:
> On Fri, Dec 20, 2013 at 11:03:53PM -0500, Adam Walters wrote:
>> This patchset adds a driver named 'config' that allows access to configuration
>> data, such as secret and storage definitions. This is a pre-requisite for my
>> next patchset which resolves the race condition on libvirtd startup and the
>> circular dependencies between QEMU and the storage driver.
> 
> I vaguely recall something being mentioned in the past, but not the
> details. Can you explain the details of the circular dependancy
> problem that you're currently facing ?

The problem is that when we are re-starting with running VMs that have
storage placed on RBD volumes with secrets stored in the secret driver
we encounter the following dependancy:

1) the qemu driver depends on the storage driver to be started so that
disk type="volume" can be resolved to the actual volumes

2) the storage driver depends on requesting credentials from the secret
driver and thus needs a connection to do so. For some strange reason the
storage driver opens "qemu:///system" for this purpose:

static void
storageDriverAutostart(virStorageDriverStatePtr driver) {
    size_t i;
    virConnectPtr conn = NULL;

    /* XXX Remove hardcoding of QEMU URI */
    if (driverState->privileged)
        conn = virConnectOpen("qemu:///system");
    else
        conn = virConnectOpen("qemu:///session");
    /* Ignoring NULL conn - let backends decide */

This works if the drivers are initialized, but breaks in the case we use
RBD volumes with secrets that and <disk type=volume, where we need to
initialize the storage driver before the qemu driver.

Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140120/46c45e7e/attachment-0001.sig>


More information about the libvir-list mailing list