[libvirt] [RFC PATCH 2/3] storage: Fix hardcoded qemu connection

Peter Krempa pkrempa at redhat.com
Mon Jan 20 14:32:55 UTC 2014


On 12/21/13 05:14, Adam Walters wrote:
> This utilizes the config driver I submitted to resolve the hardcoded qemu connection string. With this, the storage driver no longer has a circular dependency with QEMU. Without this patch, when libvirtd is restarted, QEMU requires storage (when domains are using storage pool backings) and storage requires QEMU. This causes issues during startup.

Please break the summary into multiple lines. The usual set point is 72
columns so that "git log" fits into the 80 column legacy terminal setting.

> 
> Signed-off-by: Adam Walters <adam at pandorasboxen.com>
> ---
>  src/storage/storage_driver.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
> index a614279..1077a66 100644
> --- a/src/storage/storage_driver.c
> +++ b/src/storage/storage_driver.c
> @@ -70,12 +70,12 @@ 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 */
> +    conn = virConnectOpen("config:///");
> +    /* Ignoring NULL conn - let backends decide.  *
> +     * As long as the config driver is built, and *
> +     * it should be, since it is default on and   *
> +     * not configurable, a NULL conn should never *
> +     * happen.

Missing closing of the comment. (fails pretty badly at compile time)

>  
>      for (i = 0; i < driver->pools.count; i++) {
>          virStoragePoolObjPtr pool = driver->pools.objs[i];
> 

Otherwise looks good.

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/e8ae4c80/attachment-0001.sig>


More information about the libvir-list mailing list