BIND 10 trac2140, updated. df196f7609757253c4f2f918cd91012bb3af1163 [2140] LeaseMgr minor tweaks, ChangeLog updated.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Oct 11 11:40:38 UTC 2012


The branch, trac2140 has been updated
       via  df196f7609757253c4f2f918cd91012bb3af1163 (commit)
      from  a1983f43686919fae5dfb05ad8e6da07e5534111 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit df196f7609757253c4f2f918cd91012bb3af1163
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Thu Oct 11 13:40:11 2012 +0200

    [2140] LeaseMgr minor tweaks, ChangeLog updated.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                |    6 ++++++
 src/lib/dhcp/lease_mgr.h |   49 +++++++++++++++++++++++++++++++---------------
 2 files changed, 39 insertions(+), 16 deletions(-)

-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 5aec82c..40c28db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+4XX.	[func]		tomek
+	libdhcp++: An abstract API for lease database has been
+	implemented. It offers a common interface to all concrete
+	database backends.
+	(Trac #2140, git TBD)
+
 bind10-devel-20120816 released on August 16, 2012
 
 467.	[bug]		jelte
diff --git a/src/lib/dhcp/lease_mgr.h b/src/lib/dhcp/lease_mgr.h
index 7dd69d4..4b7a1af 100644
--- a/src/lib/dhcp/lease_mgr.h
+++ b/src/lib/dhcp/lease_mgr.h
@@ -21,6 +21,37 @@
 #include <dhcp/option.h>
 #include <dhcp/duid.h>
 
+/// @file dhcp/lease_mgr.h
+/// @brief An abstract API for lease database
+///
+/// This file contains declarations of Lease4, Lease6 and LeaseMgr classes.
+/// They are essential components of the interface to any database backend.
+/// Each concrete database backend (e.g. MySQL) will define a class derived
+/// from LeaseMgr class.
+///
+/// Failover considerations:
+/// There are no intermediate plans to implement DHCPv4 failover
+/// (draft-ietf-dhc-failover-12.txt). Currently (Oct. 2012) the DHCPv6 failover
+/// is being defined in DHC WG in IETF (draft-ietf-dhcpv6-failover-requirements,
+/// draft-ietf-dhcpv6-dailover-design), but the work is not advanced enough
+/// for implementation plans yet. v4 failover requires additional parameters
+/// to be kept with a lease. It is likely that v6 failover will require similar
+/// fields. Such implementation will require database schema extension.
+/// We have designed a way to expand/upgrade schemas during upgrades: a database
+/// schema is versioned and sanity checks about required version will be done
+/// upon start and/or upgrade. With this mechanism in place, we can add new
+/// fields to the database. In particular we can use that capability to
+/// introduce failover related fields.
+///
+/// However, there is another approach that can be reliably used to provide
+/// failover, even without the actual failover protocol implemented. As the
+/// first backend will use MySQL, we will be able to use Multi-Master capability
+/// offered by MySQL and use two separatate Kea instances connecting to the
+/// same database.
+///
+/// Nevertheless, we hope to have failover protocol eventually implemented in
+/// the Kea.
+
 namespace isc {
 namespace dhcp {
 
@@ -102,12 +133,6 @@ struct Lease4 {
     /// @brief did we update PTR record for this lease?
     bool fqdn_rev_;
 
-    /// @brief additional options stored with this lease
-    ///
-    /// This field is currently not used.
-    /// @todo We need a way to store options in the databased.
-    Option::OptionCollection options_;
-
     /// @brief Lease comments.
     ///
     /// Currently not used. It may be used for keeping comments made by the
@@ -220,13 +245,6 @@ struct Lease6 {
     /// @brief did we update PTR record for this lease?
     bool fqdn_rev_;
 
-    /// @brief additional options stored with this lease
-    ///
-    /// That field is currently not used. We may keep extra options assigned
-    /// for leasequery and possibly other purposes.
-    /// @todo We need a way to store options in the databased.
-    Option::OptionCollection options_;
-
     /// @brief Lease comments
     ///
     /// This field is currently not used.
@@ -328,7 +346,7 @@ public:
     /// @param subnet_id identifier of the subnet that lease must belong to
     ///
     /// @return a pointer to the lease (or NULL if a lease is not found)
-    virtual Lease4Ptr getLease4(const HWAddr& hwaddr, 
+    virtual Lease4Ptr getLease4(const HWAddr& hwaddr,
                                 SubnetID subnet_id) const = 0;
 
     /// @brief Returns existing IPv4 lease for specified client-id
@@ -377,7 +395,7 @@ public:
     /// @param iaid IA identifier
     ///
     /// @return smart pointer to the lease (or NULL if a lease is not found)
-    virtual Lease6Collection getLease6(const DUID& duid, 
+    virtual Lease6Collection getLease6(const DUID& duid,
                                        uint32_t iaid) const = 0;
 
     /// @brief Returns existing IPv6 lease for a given DUID+IA combination
@@ -457,7 +475,6 @@ protected:
     std::map<std::string, std::string> parameters_;
 };
 
-
 }; // end of isc::dhcp namespace
 
 }; // end of isc namespace



More information about the bind10-changes mailing list