[libvirt] [PATCH] leaseshelper: add enhancements to support all events
Nehal J Wani
nehaljw.kkd1 at gmail.com
Wed Jul 16 07:39:07 UTC 2014
On Fri, Jul 11, 2014 at 5:49 AM, Nehal J Wani <nehaljw.kkd1 at gmail.com> wrote:
> This patch enables the helper program to detect event(s) triggered when there
> is a change in lease length or expiry and client-id. This transfers complete
> control of leases database to libvirt and suppresses use of the lease database
> file (<network-name>.leases). That file will not be created, read, or written.
> This is achieved by adding the option --leasefile-ro to dnsmasq and applying
> the symlink technique, which helps us map events related to leases with their
> corresponding network bridges.
> Example:
> /var/lib/libvirt/dnsmasq/virbr0.helper -> /home/wani/libvirt/src/libvirt_leaseshelper
> /var/lib/libvirt/dnsmasq/virbr3.helper -> /home/wani/libvirt/src/libvirt_leaseshelper
>
> Also, this requires the addition of a new non-lease entry in our custom lease
> database: "server-duid". It is required to identify a DHCPv6 server.
>
> Now that dnsmasq doesn't maintain its own leases database, it relies on our
> helper program to tell it about previous leases and server duid. Thus, this
> patch makes our leases program honor an extra action: "init", in which it sends
> the known info in a particular format to dnsmasq by printing it to stdout.
>
> ---
> src/network/bridge_driver.c | 43 +++++++++++-
> src/network/leaseshelper.c | 156 +++++++++++++++++++++++++++++++++++++-------
> 2 files changed, 175 insertions(+), 24 deletions(-)
Ping!
More information about the libvir-list
mailing list