[libvirt] [PATCH] Allow address lease query with inactive domain

Daniel P. Berrange berrange at redhat.com
Wed Sep 7 09:41:26 UTC 2016


On Wed, Sep 07, 2016 at 11:18:58AM +0200, Amador Pahim wrote:
> The <drive>DomainInterfaceAddresses, when using the source type
> LEASE, does not need the domain to be running. It only checks the
> dhcp lease file and gets the address information from a valid lease,
> if any.
> 
> This patch removes the virDomainObjIsActive(vm) check from the LEASE
> query type on both qemu and lxc drivers, keeping it only for query
> type AGENT on qemu driver (since lxc does not support AGENT type).

I don't think we should do this. IMHO it only makes sense to ask for
the IP address when the guest is actually running. The fact that we
might still happen to have an old IP address stored in the lease
file is merely a happy accident and not something we should guarantee
by exposing ability to get it in the API.


Regards,
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