[libvirt] many more config variables required? or 1 "prefix" config

Daniel P. Berrange berrange at redhat.com
Mon Mar 2 18:32:22 UTC 2009

On Mon, Mar 02, 2009 at 03:18:43PM +0100, Jim Meyering wrote:
> I found network-related config from one test leaking into another
> and making the latter test fail, despite my use of what I thought
> was everything required to keep them separate (unix_sock_dir and
> log_outputs both set in config, and --pid-file specified on command line).
> Unfortunately, there are still hard-coded references to some files.
>     /* Configuration paths are either ~/.libvirt/qemu/... (session) or
>      * /etc/libvirt/qemu/... (system).
> That's from network_driver.c, to set these variables:
>   struct network_driver
>      ->networkConfigDir
>      ->networkAutostartDir
> However, storage_driver is nearly identical in that respect.
> It also uses ~/.libvirt/ vs SYSCONF_DIR/libvirt.
> Same for uml_driver.c.
> So, rather than adding new variables for each of these six new
> parameters, how about just one new config parameter to allow
> specification of a directory prefix that would replace
> "~" and "/etc" in determining how to form config-related names?

Sounds reasonable - the main issue is how to get this info to the 
drivers - I think we'll probably want to change virStateInitialize(void)
to accept a "const char *configPrefix" parameter in order to pass this
to the drivers.

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the libvir-list mailing list