1. Updated Kea guide to note that removing the hooks-libraries
configuration element does not always have the expected effect.
2. Moved some documentation from the dhcp_parsers.cc file to the .h file.
3. Expanded checking of the contents of the hooks-libraries configuration
element.
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
Added two new unit tests to verify lease file upgrade
via automatic LFC invocation:
TEST_F(MemfileLeaseMgrTest, leaseUpgrade4)
TEST_F(MemfileLeaseMgrTest, leaseUpgrade6)
Memfile_LeaseMgr loads the lease files during instantiation. If it detects
that any of the files loaded are out of date, it will invoke LFC directly,
whether or not LFC is enabled.
src/lib/dhcpsrv/dhcpsrv_messages.mes
added two new log messages:
DHCPRSV_MEMFILE_UPGRADING_LEASE_FILES
DHCPSRV_MEMFILE_NEEDS_UPGRADING
src/lib/dhcpsrv/lease_file_loader.h
LeaseFileLoader::load() - emits DHCPSRV_MEMFILE_NEEDS_UPGRADING log
when an out of date file is detected
src/lib/dhcpsrv/memfile_lease_mgr.cc
LFCSetup::setup() - added run_once_now parameter, which causes the
method to invoke the LFC callback immediately, regardless of the value
of LFC interval.
Memfile_LeaseMgr::Memfile_LeaseMgr() - added logic to track if
files loaded need upgrading and pass that into lfcSetup()
Memfile_LeaseMgr::loadLeasesFromFiles() - change to return a boolean
true if any of the files loaded need upgrading.
Memfile_LeaseMgr::lfcSetup() - added upgrade_needed parameter, which
is passed through to LFCSetup::setup() as "run_once_now"
src/lib/util/csv_file.h
Made recreate() virtual
src/lib/util/versioned_csv_file.h
src/lib/util/versioned_csv_file.cc
Added several methods to VersionedCSVFile:
getValidColumnCount() - returns number of valid columns in header
recreate() - wraps base class method, ensuring valid column
count gets set to number of defined columns for new files
needsUpgrading() - returns bool true if file schema is out of date
getInputSchemaVersion() - returns schema version found in file
getSchemaVersion() - returns current schema version
getVersionedColumn() - returns the column definition for a given index
src/lib/util/tests/versioned_csv_file_unittest.cc
Added checks for new methods to existing tests