[libvirt] [libvirt-snmp][PATCH] New environment variable managing connection URI.
Daniel P. Berrange
berrange at redhat.com
Thu Feb 10 10:02:36 UTC 2011
On Thu, Feb 10, 2011 at 10:43:08AM +0800, Daniel Veillard wrote:
> On Wed, Feb 09, 2011 at 04:43:25PM +0100, Michal Privoznik wrote:
> > Add environment variable LIBVIRT_MIB_CONNECT_URI to control URI
> > which snmp agent is connecting to. It is now possible to connect
> > to all hypervisors (including test:///) instead of hardcoded
> > qemu:///system, which is used now by default when variable is not
> > set.
>
> Should this use the existing LIBVIRT_DEFAULT_URI if set instead ?
> That's the current way to define the default URI for the stack, so
> why would you want a different one for SNMP ?
Yes, the problem is that the current code is passing an explicit
qemu:///system in to virConnectOpen, so libvirt's default logic
is being bypassed. If the SNMP agent just passed 'NULL' then libvirt
would auto-pick the hypervisor, and LIBVIRT_DEFAULT_URI would also
'just work'. So NACK to this patch, ust replace qemu:///system with
NULL.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list