]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5341] Default lfc-interval is now set to 3600.
authorMarcin Siodelski <marcin@isc.org>
Mon, 23 Oct 2017 19:49:34 +0000 (21:49 +0200)
committerMarcin Siodelski <marcin@isc.org>
Mon, 23 Oct 2017 19:49:34 +0000 (21:49 +0200)
doc/guide/dhcp4-srv.xml
doc/guide/dhcp6-srv.xml
src/bin/keactrl/kea-dhcp4.conf.pre
src/bin/keactrl/kea-dhcp6.conf.pre
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc

index 20e4c60024ba07873d5f2a954ca606b805885c0e..73040cd1793ce7635e07711af833c6bf36c8e64a 100644 (file)
@@ -352,8 +352,8 @@ be followed by a comma and another object definition.</para>
       removes redundant (historical) information from the lease file
       and effectively reduces the lease file size. The cleanup process is described
       in more detailed fashion further in this section. The default value of the
-      <command>lfc-interval</command> is <userinput>0</userinput>, which disables
-      the LFC.</simpara>
+      <command>lfc-interval</command> is <userinput>3600</userinput>. A value of 0
+      disables the LFC.</simpara>
     </listitem>
 
   </itemizedlist>
index 66da042a07d2397a6affd023ae0a3e2c3431eb2f..d63654dc1b7e1758a4045cfa3d891371ad1d857a 100644 (file)
@@ -347,8 +347,8 @@ be followed by a comma and another object definition.</para>
       removes redundant (historical) information from the lease file
       and effectively reduces the lease file size. The cleanup process is described
       in more detailed fashion further in this section. The default value of the
-      <command>lfc-interval</command> is <userinput>0</userinput>, which disables
-      the LFC.</simpara>
+      <command>lfc-interval</command> is <userinput>3600</userinput>. A value of 0
+      disables the LFC.</simpara>
     </listitem>
 
   </itemizedlist>
index 191c37d66939ba28cec5a222107093ef46be3aab..d75a6e294ae3c29db3ad3c87217716fc65149407 100644 (file)
@@ -61,7 +61,8 @@
     "lease-database": {
         // Memfile is the simplest and easiest backend to use. It's a in-memory
         // C++ database that stores its state in CSV file.
-        "type": "memfile"
+        "type": "memfile",
+        "lfc-interval": 3600
     },
 
     // Kea allows storing host reservations in a database. If your network is
index 3648bda68ff7fb10470af16c892fa5aa448f3d7f..3b978e8e2da97863cce791e7e885b87d60c851c6 100644 (file)
@@ -53,7 +53,8 @@
     // There are dedicated examples for each backend. See Section 8.2.2 "Lease
     // Storage" for details.
     "lease-database": {
-        "type": "memfile"
+        "type": "memfile",
+        "lfc-interval": 3600
     },
 
     // Kea allows storing host reservations in a database. If your network is
index 1834365968d3bef1adc32bc8e8d198b6b7ff946b..cb58084c54292e718d6a8b672667b86cc81b0093 100644 (file)
@@ -1219,11 +1219,11 @@ Memfile_LeaseMgr::lfcCallback() {
 
 void
 Memfile_LeaseMgr::lfcSetup(bool conversion_needed) {
-    std::string lfc_interval_str = "0";
+    std::string lfc_interval_str = "3600";
     try {
         lfc_interval_str = conn_.getParameter("lfc-interval");
     } catch (const std::exception&) {
-        // Ignore and default to 0.
+        // Ignore and default to 3600.
     }
 
     uint32_t lfc_interval = 0;
index 8471ff7ed836ebed3765b467a1eb70551364a5bf..b4eafa44b05c21d515a976b99a9b411db8cbe16f 100644 (file)
@@ -188,7 +188,8 @@ public:
         std::ostringstream s;
         s << "type=memfile " << (u == V4 ? "universe=4 " : "universe=6 ")
           << "name="
-          << getLeaseFilePath(u == V4 ? "leasefile4_0.csv" : "leasefile6_0.csv");
+          << getLeaseFilePath(u == V4 ? "leasefile4_0.csv" : "leasefile6_0.csv")
+          << " lfc-interval=0";
         return (s.str());
     }
 
@@ -426,6 +427,7 @@ TEST_F(MemfileLeaseMgrTest, persistLeases) {
 
     DatabaseConnection::ParameterMap pmap;
     pmap["universe"] = "4";
+    pmap["lfc-interval"] = "0";
     // Specify the names of the lease files. Leases will be written.
     pmap["name"] = getLeaseFilePath("leasefile4_1.csv");
     boost::scoped_ptr<Memfile_LeaseMgr> lease_mgr(new Memfile_LeaseMgr(pmap));
@@ -1633,6 +1635,7 @@ TEST_F(MemfileLeaseMgrTest, lease4ContainerIndexUpdate) {
     pmap["universe"] = "4";
     pmap["name"] = leasefile;
     pmap["persist"] = "true";
+    pmap["lfc-interval"] = "0";
 
     srand(seed);
 
@@ -1772,6 +1775,7 @@ TEST_F(MemfileLeaseMgrTest, lease6ContainerIndexUpdate) {
     pmap["universe"] = "6";
     pmap["name"] = leasefile;
     pmap["persist"] = "true";
+    pmap["lfc-interval"] = "0";
 
     srand(seed);