2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-01 22:45:18 +00:00

[master] Merge branch 'trac5341'

This commit is contained in:
Marcin Siodelski
2017-10-24 11:09:15 +02:00
6 changed files with 15 additions and 9 deletions

View 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>

View 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>

View 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

View 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

View 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;

View 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);