Commit 939e65e3 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[5058] CSV lease file loading now emits error log for each invalid row

    Fixed test data

    added new error log message DHCPSRV_MEMFILE_LEASE_LOAD_ROW_ERROR

    LeaseFileLoader::load() - new emits a error log for each row that
    fails to load
parent 9b19d774
......@@ -407,8 +407,9 @@ TEST_F(LFCControllerTest, launch4) {
string b_3 = ",dd:de:ba:0d:1b:2e:3e:4f,0a:00:01:04,"
// This one should be invalid, no hardware address and state is not declined
string c_1 = ",,a:11:01:04,"
string d_1 = ",16:17:18:19:1a:bc,,"
......@@ -459,6 +459,12 @@ replaced by those read from the file.
A debug message issued when DHCP lease is being loaded from the file to memory.
% DHCPSRV_MEMFILE_LEASE_LOAD_ROW_ERROR discarding row %1, error: %2
An error message issued the the DHCP lease being loaded from the given row of
the lease file fails. The log message should contain the specific reason the
row was discarded. The server will continue loading the remaining data.
This may indicate a corrupt lease file.
% DHCPSRV_MEMFILE_LFC_EXECUTE executing Lease File Cleanup using: %1
An informational message issued when the Memfile lease database backend
starts a new process to perform Lease File Cleanup.
......@@ -91,6 +91,10 @@ public:
while (true) {
// Unable to parse the lease.
if (! {
// A value of 0xFFFFFFFF indicates that we don't return
// until the whole file is parsed, even if errors occur.
// Otherwise, check if we have exceeded the maximum number
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment