On Fri, Dec 18, 2020 at 04:09:06PM +0100, Michal Privoznik wrote: > Some things are broken when using leases that don't expire. We don't > store "expiry-time" in corresponding $brname.status file which sets off > a spiral and we get errors from other places which expect it to be there > always. These patches make sure that the attribute is always there. I've > also implemented another approach, which puts "expiry-time" into the > file only if not infinite and fixed the other places which expect it: > > https://gitlab.com/MichalPrivoznik/libvirt/-/commits/leases_docs/ > > but I like this version more. > > Michal Prívozník (10): > docs: Document ability to configure lease time > leaseshelper: Report errors on failure > virlease: Rework virLeaseReadCustomLeaseFile() > virlease: Use virTrimSpaces() instead of open coded alternative > virlease: Allow infinite lease expiry time > network: Drop @custom_lease_file_len variable from > networkGetDHCPLeases() > networkGetDHCPLeases: Use VIR_APPEND_ELEMENT() instead of > VIR_INSERT_ELEMENT() > network: Rework networkGetDHCPLeases() > networkGetDHCPLeases: Handle leases with infinite expiry time > nss: handle leases with infinite expiry time > > docs/formatnetwork.html.in | 21 ++++++++- > src/network/bridge_driver.c | 79 +++++++++++++++++----------------- > src/network/leaseshelper.c | 2 + > src/util/virlease.c | 33 +++++++------- > tests/nssdata/virbr0.status | 7 +++ > tests/nsstest.c | 2 +- > tools/nss/libvirt_nss_leases.c | 4 +- > 7 files changed, 87 insertions(+), 61 deletions(-) Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|