]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3586] updated documentation
authorRazvan Becheriu <razvan@isc.org>
Fri, 4 Oct 2024 15:13:17 +0000 (18:13 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 9 Oct 2024 13:10:06 +0000 (13:10 +0000)
40 files changed:
doc/examples/kea4/all-keys-netconf.json
doc/examples/kea4/all-keys.json
doc/examples/kea4/backends.json
doc/examples/kea4/config-backend.json
doc/examples/kea4/mysql-reservations.json
doc/examples/kea4/pgsql-reservations.json
doc/examples/kea6/all-keys-netconf.json
doc/examples/kea6/all-keys.json
doc/examples/kea6/backends.json
doc/examples/kea6/config-backend.json
doc/examples/kea6/mysql-reservations.json
doc/examples/kea6/pgsql-reservations.json
doc/sphinx/arm/config-backend.rst
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/hooks-cb-cmds.rst
doc/sphinx/arm/hooks-cb-mysql.rst [deleted file]
doc/sphinx/arm/hooks-cb-pgsql.rst [deleted file]
doc/sphinx/arm/hooks-mysql.rst [new file with mode: 0644]
doc/sphinx/arm/hooks-pgsql.rst [new file with mode: 0644]
doc/sphinx/arm/hooks.rst
doc/sphinx/arm/logging.rst
doc/sphinx/arm/rst_arm_sources.mk
doc/sphinx/conf.py
src/bin/dhcp4/tests/config_parser_unittest.cc
src/bin/dhcp6/tests/config_parser_unittest.cc
src/bin/keactrl/kea-dhcp4.conf.pre
src/bin/keactrl/kea-dhcp6.conf.pre
src/hooks/dhcp/mysql/mysql_cb_dhcp4.h
src/hooks/dhcp/mysql/mysql_cb_dhcp6.h
src/hooks/dhcp/mysql/mysql_lease_mgr.cc
src/hooks/dhcp/pgsql/pgsql_cb_dhcp4.h
src/hooks/dhcp/pgsql/pgsql_cb_dhcp6.h
src/hooks/dhcp/pgsql/pgsql_lease_mgr.cc
src/lib/config_backend/base_config_backend_mgr.h
src/lib/dhcpsrv/database_backends.dox
src/lib/dhcpsrv/host_data_source_factory.cc
src/lib/dhcpsrv/lease_mgr_factory.cc
src/lib/dhcpsrv/libdhcpsrv.dox
src/share/api/status-get.json

index 7c121ff1e77a4bd7caec2d311e5c7c6dcd5fe554..528cc697b921737dc8761420132d5c3f01c02a9c 100644 (file)
                 "parameters": { }
             },
             {
-                // The MySql host backend hook library required for host storage.
+                // The MySQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
             },
             {
-                // The PgSql host backend hook library required for host storage.
+                // The PostgreSQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
             }
         ],
index 5ae152551a431bed5a34c38de926bbc4268f20d8..a7a64dd153d9acbf959affeaa5ea2fe933896ef2 100644 (file)
                 "parameters": { }
             },
             {
-                // The MySql host backend hook library required for host storage.
+                // The MySQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
             },
             {
-                // The PgSql host backend hook library required for host storage.
+                // The PostgreSQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
             }
         ],
index 62817c05d2621010c006006715df468cd05e6f57..86e716a788d441b978619e7d0eea848c0c5372ac 100644 (file)
 //      "retry-on-startup": false,
 //      "connect-timeout": 3
 //  },
+// Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+// store leases in the MySQL Lease Database Backend.
+// Specify the lease backend hook library location.
+//  {
+//      // the MySQL lease backend hook library required for lease storage.
+//      "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
+//  },
 
 // 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make
 // sure it is up, running and properly initialized. See kea-admin documentation
 //      "retry-on-startup": false,
 //      "connect-timeout": 3
 //  },
+// Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+// store leases in the PostgreSQL Lease Database Backend.
+// Specify the lease backend hook library location.
+//  {
+//      // the PostgreSQL lease backend hook library required for lease storage.
+//      "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
+//  },
 
 // Addresses will be assigned with a lifetime of 4000 seconds.
   "valid-lifetime": 4000,
index 82d36fb041df27bc6fdcd034904ae433c0095f4b..ded603ad91d2a69fc1d2e7dd1e9bc6317c0b6124 100644 (file)
@@ -1,6 +1,6 @@
 // This is an example configuration file for the DHCPv4 server in Kea.
 // It demonstrates how to enable Kea Configuration Backend using MySQL.
-// It requires that libdhcp_mysql_cb.so library is available and
+// It requires that libdhcp_mysql.so library is available and
 // optionally libdhcp_cb_cmds.so hook library.
 
 { "Dhcp4":
     },
 
     // This parameter controls how the server accesses the configuration
-    // database. Currently only one database type is available - "mysql".
-    // It requires that the libdhcp_mysql_cb.so hook library is loaded.
+    // database. Currently only two database types are available - "mysql" and
+    // "postgresql".
+    // Using "mysql" requires that the libdhcp_mysql.so hook library is loaded.
+    // If using "postgresql", then loading libdhcp_pgsql.so hook library is
+    // required.
     "config-control": {
         // A list of database backends to connect to. Currently, it is limited
         // to a single backend.
 
     // Hooks libraries that enable configuration backend are loaded.
     "hooks-libraries": [
-        // The libdhcp_mysql_cb.so is required to use MySQL Configuration
+        // The libdhcp_mysql.so is required to use MySQL Configuration
         // Backend.
         {
-            "library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
+            "library": "/usr/local/lib/kea/hooks/libdhcp_mysql.so"
         }
+        // If using PostgreSQL Configuration Backend, the "libdhcp_pgsql.so" is
+        // required.
+        // {
+        //    "library": "/usr/local/lib/kea/hooks/libdhcp_pgsql.so"
+        // }
         // The libdhcp_cb_cmds.so is optional. It allows for managing the
         // configuration in the database. If this library is not loaded,
         // the configuration can be managed directly using available
index 8b652103f73fad40a0aad691ee0fa79587a9da8c..99cf078e682ece3fe3ab255074e2cb241014ecb4 100644 (file)
     "key-file": "my-key",
     "cipher-list": "AES"
   },
-
+// Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+// store host reservations in the MySQL Host Database Backend.
 // Specify the host backend hook library location.
   "hooks-libraries": [
     {
-        // the MySql host backend hook library required for host storage.
+        // the MySQL host backend hook library required for host storage.
         "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
     }
   ],
index a05d2889b5b20e890cfa6298760a5e82648433a0..2f94a0fc07495314cbc58978c5636d76f162d15a 100644 (file)
        "host": "localhost"
     }
   ],
-
+// Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+// store host reservations in the PostgreSQL Host Database Backend.
 // Specify the host backend hook library location.
   "hooks-libraries": [
     {
-        // the PgSql host backend hook library required for host storage.
+        // the PostgreSQL host backend hook library required for host storage.
         "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
     }
   ],
index 73c8adaf464366d0259e334e6c4cd3a33375bfb5..8c716808c205c0b611595220ef1cbb53dd732bf9 100644 (file)
                 "parameters": { }
             },
             {
-                // The MySql host backend hook library required for host storage.
+                // The MySQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
             },
             {
-                // The PgSql host backend hook library required for host storage.
+                // The PostgreSQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
             }
         ],
index e87474829ce5d72852f309ad9904582d3988a73a..0e8f83cdcbab3fc955b53a1f7889b3cce41686b5 100644 (file)
                 "parameters": { }
             },
             {
-                // The MySql host backend hook library required for host storage.
+                // The MySQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
             },
             {
-                // The PgSql host backend hook library required for host storage.
+                // The PostgreSQL host backend hook library required for host storage.
                 "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
             }
         ],
                                 "prefixes": [ "2001:db8:2:abcd::/64" ],
 
                                 // List of excluded IPv6 prefixes.
-                               "excluded-prefixes": [ "2001:db8:2:abcd:1::/80" ],
+                                "excluded-prefixes": [ "2001:db8:2:abcd:1::/80" ],
 
                                 // Reserved hostname.
                                 "hostname": "foo.example.com",
index 350c8d60f5223346d787d5be5b83ae227616a952..31ab9697f1599a2f3bb84daee18358a5344f0997 100644 (file)
 //      "retry-on-startup": false,
 //      "connect-timeout": 3
 //  },
+// Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+// store leases in the MySQL Lease Database Backend.
+// Specify the lease backend hook library location.
+//  {
+//      // the MySQL lease backend hook library required for lease storage.
+//      "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
+//  },
 
 // 3. PostgreSQL backend. Leases will be stored in PostgreSQL database. Make
 // sure it is up, running and properly initialized. See kea-admin documentation
 //      "retry-on-startup": false,
 //      "connect-timeout": 3
 //  },
+// Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+// store leases in the PostgreSQL Lease Database Backend.
+// Specify the lease backend hook library location.
+//  {
+//      // the PostgreSQL lease backend hook library required for lease storage.
+//      "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
+//  },
 
 // Addresses will be assigned with preferred and valid lifetimes
 // being 3000 and 4000, respectively. Client is told to start
index d269f3f120c98dfbd78725e1af48c90a052901fe..5ec2efd0362582519ee5f4d0ff5a1d329530a3c0 100644 (file)
@@ -1,6 +1,6 @@
 // This is an example configuration file for the DHCPv4 server in Kea.
 // It demonstrates how to enable Kea Configuration Backend using MySQL.
-// It requires that libdhcp_mysql_cb.so library is available and
+// It requires that libdhcp_mysql.so library is available and
 // optionally libdhcp_cb_cmds.so hook library.
 
 { "Dhcp6":
     },
 
     // This parameter controls how the server accesses the configuration
-    // database. Currently only one database type is available - "mysql".
-    // It requires that libdhcp_mysql_cb.so hook library is loaded.
+    // database. Currently only two database types are available - "mysql" and
+    // "postgresql".
+    // Using "mysql" requires that the libdhcp_mysql.so hook library is loaded.
+    // If using "postgresql", then loading libdhcp_pgsql.so hook library is
+    // required.
     "config-control": {
         // A list of database backends to connect to. Currently, it is limited
         // to a single backend.
 
     // Hooks libraries that enable configuration backend are loaded.
     "hooks-libraries": [
-        // The libdhcp_mysql_cb.so is required to use MySQL Configuration
+        // The libdhcp_mysql.so is required to use MySQL Configuration
         // Backend.
         {
-            "library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
+            "library": "/usr/local/lib/kea/hooks/libdhcp_mysql.so"
         }
+        // If using PostgreSQL Configuration Backend, the "libdhcp_pgsql.so" is
+        // required.
+        // {
+        //    "library": "/usr/local/lib/kea/hooks/libdhcp_pgsql.so"
+        // }
         // The libdhcp_cb_cmds.so is optional. It allows for managing the
         // configuration in the database. If this library is not loaded,
         // the configuration can be managed directly using available
index 49870daad01710abaa4b2e99ddebead6bba44f7e..a6b09afe108e508e7d63c1ec6b456735f8c47cd7 100644 (file)
     "key-file": "my-key",
     "cipher-list": "AES"
   },
-
+// Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+// store host reservations in the MySQL Host Database Backend.
 // Specify the host backend hook library location.
   "hooks-libraries": [
     {
-        // the MySql host backend hook library required for host storage.
+        // the MySQL host backend hook library required for host storage.
         "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
     }
   ],
index 014007a604c16c6fce3f62362494d133a76cb86f..0910f2f3c02a006a06dd1ecbe7334be4cf434fb6 100644 (file)
        "host": "localhost"
     }
   ],
-
+// Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+// store host reservations in the PostgreSQL Host Database Backend.
 // Specify the host backend hook library location.
   "hooks-libraries": [
     {
-        // the PgSql host backend hook library required for host storage.
+        // the PostgreSQL host backend hook library required for host storage.
         "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
     }
   ],
index 0ee742c763d6a12439ad5d8610b4d54baae66a00..8b5d0db1444f21605bf4970734018289960313d0 100644 (file)
@@ -14,10 +14,10 @@ this documentation, the term "Configuration Backend" may also refer to
 the particular Kea module providing support to manage and fetch the
 configuration information from the particular database type. For
 example, the MySQL Configuration Backend is the logic implemented within
-:ischooklib:`libdhcp_mysql_cb.so`, which provides a complete set of functions to
+:ischooklib:`libdhcp_mysql.so`, which provides a complete set of functions to
 manage and fetch the configuration information from the MySQL database.
 The PostgreSQL Configuration Backend is the logic implemented within
-:ischooklib:`libdhcp_pgsql_cb.so`, which provides a complete set of functions to
+:ischooklib:`libdhcp_pgsql.so`, which provides a complete set of functions to
 manage and fetch the configuration information from the PostgreSQL database.
 From here on, the term "database" is used to refer to either a MySQL or
 PostgreSQL database.
@@ -163,15 +163,17 @@ in two independent configuration sources.
 CB Components
 -------------
 
-To use a MySQL configuration backend, :ischooklib:`libdhcp_mysql_cb.so`
-must be compiled and the DHCP servers must be configured to load it.
-It is compiled when the ``--with-mysql`` configuration switch is used during the Kea build.
-The MySQL C client libraries must be installed, as explained in :ref:`dhcp-install-configure`.
-
-To use a PostgreSQL configuration backend, :ischooklib:`libdhcp_pgsql_cb.so` must
-be compiled and the DHCP servers must be configured to load it. It is compiled when
-the ``--with-pgsql`` configuration switch is used during the Kea build. The PostgreSQL
-C client libraries must be installed, as explained in :ref:`dhcp-install-configure`.
+To use a MySQL configuration backend, :ischooklib:`libdhcp_mysql.so` must
+be compiled and the DHCP servers must be configured to load it. It is compiled
+when the ``--with-mysql`` configuration switch is used during the Kea build.
+The MySQL C client libraries must be installed, as explained in
+:ref:`dhcp-install-configure`.
+
+To use a PostgreSQL configuration backend, :ischooklib:`libdhcp_pgsql.so` must
+be compiled and the DHCP servers must be configured to load it. It is compiled
+when the ``--with-pgsql`` configuration switch is used during the Kea build.
+The PostgreSQL C client libraries must be installed, as explained in
+:ref:`dhcp-install-configure`.
 
 .. note::
 
index f7568521e95f8375651ea3754a274a5987c18ba4..3eb08147cd74a1ad47df8ad4677868daff66535a 100644 (file)
@@ -660,6 +660,30 @@ error.
     ``host`` parameter is ``localhost``, but establishes a TCP connection
     for ``127.0.0.1``.
 
+Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+store leases in the MySQL Lease Database Backend.
+Specify the lease backend hook library location:
+
+::
+
+   "Dhcp4": { "hooks-libraries": [
+       {
+           // the MySQL lease backend hook library required for lease storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
+       }, ... ], ... }
+
+Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+store leases in the PostgreSQL Lease Database Backend.
+Specify the lease backend hook library location.
+
+::
+
+   "Dhcp4": { "hooks-libraries": [
+       {
+           // the PostgreSQL lease backend hook library required for lease storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
+       }, ... ], ... }
+
 
 .. _hosts4-storage:
 
@@ -893,6 +917,30 @@ the parameter is not specified.
    The ``readonly`` parameter is only supported for MySQL and
    PostgreSQL databases.
 
+Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+store host reservations in the MySQL Host Database Backend.
+Specify the lease backend hook library location:
+
+::
+
+   "Dhcp4": { "hooks-libraries": [
+       {
+           // the MySQL host backend hook library required for host storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
+       }, ... ], ... }
+
+Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+store host reservations in the PostgreSQL Host Database Backend.
+Specify the lease backend hook library location.
+
+::
+
+   "Dhcp4": { "hooks-libraries": [
+       {
+           // the PostgreSQL host backend hook library required for host storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
+       }, ... ], ... }
+
 
 Tuning Database Timeouts for Hosts Storage
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -8272,29 +8320,61 @@ database:
 .. code-block:: json
 
    {
-     "Dhcp4": {
-       "server-tag": "my DHCPv4 server",
-       "config-control": {
-           "config-databases": [
-           {
-               "type": "mysql",
-               "name": "kea",
-               "user": "kea",
-               "password": "kea",
-               "host": "192.0.2.1",
-               "port": 3302
-           }
-           ],
-           "config-fetch-wait-time": 20
-       },
-       "hooks-libraries": [
-       {
-           "library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
-       }, {
-           "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
+       "Dhcp4": {
+           "server-tag": "my DHCPv4 server",
+           "config-control": {
+               "config-databases": [
+                   {
+                       "type": "mysql",
+                       "name": "kea",
+                       "user": "kea",
+                       "password": "kea",
+                       "host": "192.0.2.1",
+                       "port": 3302
+                   }
+               ],
+               "config-fetch-wait-time": 20
+           },
+           "hooks-libraries": [
+               {
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_mysql.so"
+               },
+               {
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
+               }
+           ]
+       }
+   }
+
+The following snippet illustrates the use of a PostgreSQL database:
+
+.. code-block:: json
+
+   {
+       "Dhcp4": {
+           "server-tag": "my DHCPv4 server",
+           "config-control": {
+               "config-databases": [
+                   {
+                       "type": "postgresql",
+                       "name": "kea",
+                       "user": "kea",
+                       "password": "kea",
+                       "host": "192.0.2.1",
+                       "port": 3302
+                   }
+               ],
+               "config-fetch-wait-time": 20
+           },
+           "hooks-libraries": [
+               {
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_pgsql.so"
+               },
+               {
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
+               }
+           ]
        }
-       ]
-     }
    }
 
 The ``config-control`` map contains two parameters. ``config-databases``
@@ -8308,36 +8388,6 @@ during startup or reconfiguration, and fetches the configuration
 available for this server from the database. This configuration is
 merged into the configuration read from the configuration file.
 
-The following snippet illustrates the use of a PostgreSQL database:
-
-.. code-block:: json
-
-   {
-     "Dhcp4": {
-       "server-tag": "my DHCPv4 server",
-       "config-control": {
-           "config-databases": [
-           {
-               "type": "postgresql",
-               "name": "kea",
-               "user": "kea",
-               "password": "kea",
-               "host": "192.0.2.1",
-               "port": 5432
-           }
-           ],
-           "config-fetch-wait-time": 20
-       },
-       "hooks-libraries": [
-       {
-           "library": "/usr/local/lib/kea/hooks/libdhcp_pgsql_cb.so"
-       }, {
-           "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
-       }
-       ]
-     }
-   }
-
 .. note::
 
    Whenever there is a conflict between the parameters specified in the
@@ -8376,11 +8426,11 @@ waiting for the next fetch cycle.
 
 In the configuration examples above, two hook libraries are loaded. The first
 is a library which implements the configuration backend for a specific database
-type: :ischooklib:`libdhcp_mysql_cb.so` provides support for MySQL and :ischooklib:`libdhcp_pgsql_cb.so`
-provides support for PostgreSQL. The library loaded must match the database
-``type`` specified within the ``config-control`` parameter; otherwise an error
-is logged when the server attempts to load its configuration, and the load
-fails.
+type: :ischooklib:`libdhcp_mysql.so` provides support for MySQL and
+:ischooklib:`libdhcp_pgsql.so` provides support for PostgreSQL. The library
+loaded must match the database ``type`` specified within the ``config-control``
+parameter; otherwise an error is logged when the server attempts to load its
+configuration, and the load fails.
 
 The second hook library, :ischooklib:`libdhcp_cb_cmds.so`, is optional. It should
 be loaded when the Kea server instance is to be used to manage the
index 324ef3509ed9a10d95b9e140e53b787789ef3d70..29bc86481f5b87c4427710c5561fc2fa25878630 100644 (file)
@@ -616,6 +616,30 @@ error.
     ``host`` parameter is ``localhost``, but establishes a TCP connection
     for ``127.0.0.1``.
 
+Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+store leases in the MySQL Lease Database Backend.
+Specify the lease backend hook library location:
+
+::
+
+   "Dhcp6": { "hooks-libraries": [
+       {
+           // the MySQL lease backend hook library required for lease storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
+       }, ... ], ... }
+
+Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+store leases in the PostgreSQL Lease Database Backend.
+Specify the lease backend hook library location.
+
+::
+
+   "Dhcp6": { "hooks-libraries": [
+       {
+           // the PostgreSQL lease backend hook library required for lease storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
+       }, ... ], ... }
+
 
 .. _hosts6-storage:
 
@@ -849,6 +873,30 @@ the parameter is not specified.
    The ``readonly`` parameter is only supported for MySQL and
    PostgreSQL databases.
 
+Since Kea.2.7.4, the libdhcp_mysql.so hook library must be loaded in order to
+store host reservations in the MySQL Host Database Backend.
+Specify the lease backend hook library location:
+
+::
+
+   "Dhcp6": { "hooks-libraries": [
+       {
+           // the MySQL host backend hook library required for host storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_mysql.so"
+       }, ... ], ... }
+
+Since Kea.2.7.4, the libdhcp_pgsql.so hook library must be loaded in order to
+store host reservations in the PostgreSQL Host Database Backend.
+Specify the lease backend hook library location.
+
+::
+
+   "Dhcp6": { "hooks-libraries": [
+       {
+           // the PostgreSQL host backend hook library required for host storage.
+           "library": "/opt/lib/kea/hooks/libdhcp_pgsql.so"
+       }, ... ], ... }
+
 
 Tuning Database Timeouts for Hosts Storage
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -8085,7 +8133,7 @@ database:
 
    {
        "Dhcp6": {
-       "server-tag": "my DHCPv6 server",
+           "server-tag": "my DHCPv6 server",
            "config-control": {
                "config-databases": [
                    {
@@ -8101,7 +8149,38 @@ database:
            },
            "hooks-libraries": [
                {
-                   "library": "/usr/local/lib/kea/hooks/libdhcp_mysql_cb.so"
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_mysql.so"
+               },
+               {
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
+               }
+           ]
+       }
+   }
+
+The following snippet illustrates the use of a PostgreSQL database:
+
+.. code-block:: json
+
+   {
+       "Dhcp6": {
+           "server-tag": "my DHCPv6 server",
+           "config-control": {
+               "config-databases": [
+                   {
+                       "type": "postgresql",
+                       "name": "kea",
+                       "user": "kea",
+                       "password": "kea",
+                       "host": "2001:db8:1::1",
+                       "port": 3302
+                   }
+               ],
+               "config-fetch-wait-time": 20
+           },
+           "hooks-libraries": [
+               {
+                   "library": "/usr/local/lib/kea/hooks/libdhcp_pgsql.so"
                },
                {
                    "library": "/usr/local/lib/kea/hooks/libdhcp_cb_cmds.so"
index f79348d04ad9b6a8356362554009b9e08195c4b7..478d2d9edeafc4b20fb9d5c0ad71219a3c068a5f 100644 (file)
@@ -4,19 +4,18 @@
 ``libdhcp_cb_cmds.so``: Configuration Backend Commands
 ======================================================
 
-This hook library is used to manage Kea
-servers' configurations in a configuration backend database. This library must
-be used in conjunction with the available CB hook libraries implementing
-the common APIs to create, read, update, and delete (CRUD) the
-configuration information in the respective databases. For example:
-:ischooklib:`libdhcp_mysql_cb.so` implements this API for MySQL while
-:ischooklib:`libdhcp_pgsql_cb.so` implements this API for PostgreSQL.
+This hook library is used to manage Kea servers' configurations in a
+configuration backend database. This library must be used in conjunction with
+the available CB hook libraries implementing the common APIs to create, read,
+update, and delete (CRUD) the configuration information in the respective
+databases. For example: :ischooklib:`libdhcp_mysql.so` implements this API for
+MySQL while :ischooklib:`libdhcp_pgsql.so` implements this API for PostgreSQL.
 To manage the configuration information in a MySQL database, both
-:ischooklib:`libdhcp_mysql_cb.so` and :ischooklib:`libdhcp_cb_cmds.so`
-must be loaded by the server used for configuration management.
+:ischooklib:`libdhcp_mysql.so` and :ischooklib:`libdhcp_cb_cmds.so` must be
+loaded by the server used for configuration management.
 To manage the configuration information in a PostgreSQL database, both
-:ischooklib:`libdhcp_pgsql_cb.so` and :ischooklib:`libdhcp_cb_cmds.so`
-must be loaded by the server used for configuration management.
+:ischooklib:`libdhcp_pgsql.so` and :ischooklib:`libdhcp_cb_cmds.so` must be
+loaded by the server used for configuration management.
 
 More information on how to configure the Configuration Backend hook library for
 use with a MySQL or PostgreSQL database can be found in the :ref:`dhcp4-cb`
diff --git a/doc/sphinx/arm/hooks-cb-mysql.rst b/doc/sphinx/arm/hooks-cb-mysql.rst
deleted file mode 100644 (file)
index 28536c9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-.. ischooklib:: libdhcp_mysql_cb.so
-.. _hooks-cb-mysql:
-
-``libdhcp_mysql_cb.so``: Configuration Backend for MySQL
-========================================================
-
-This hook library works in conjunction with :ischooklib:`libdhcp_cb_cmds.so` to
-implement the API to create, read, update, and delete (CRUD) the
-configuration in a MySQL database. Please see :ref:`hooks-cb-cmds`
-for more details.
-
-.. note::
-
-    :ischooklib:`libdhcp_mysql_cb.so` is part of the open source code and is
-    available to every Kea user. However, this hook library only works
-    with :ischooklib:`libdhcp_cb_cmds.so`, which allows easy configuration
-    management with the use of API commands. :ischooklib:`libdhcp_cb_cmds.so`
-    is available only to ISC customers with a paid support contract; for more information
-    on subscription options, please complete the form at https://www.isc.org/contact.
diff --git a/doc/sphinx/arm/hooks-cb-pgsql.rst b/doc/sphinx/arm/hooks-cb-pgsql.rst
deleted file mode 100644 (file)
index 3fa9b69..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-.. ischooklib:: libdhcp_pgsql_cb.so
-.. _hooks-cb-pgsql:
-
-``libdhcp_pgsql_cb.so``: Configuration Backend for PostgreSQL
-=============================================================
-
-This hook library works in conjunction with :ischooklib:`libdhcp_cb_cmds.so` to
-implement the API to create, read, update, and delete (CRUD) the
-configuration in a PostgreSQL database. Please see :ref:`hooks-cb-cmds`
-for more details.
-
-.. note::
-
-    :ischooklib:`libdhcp_pgsql_cb.so` is part of the open source code and is
-    available to every Kea user. However, this hook library only works
-    with :ischooklib:`libdhcp_cb_cmds.so`, which allows easy configuration
-    management with the use of API commands. :ischooklib:`libdhcp_cb_cmds.so`
-    is available only to ISC customers with a paid support contract; for more information
-    on subscription options, please complete the form at https://www.isc.org/contact.
diff --git a/doc/sphinx/arm/hooks-mysql.rst b/doc/sphinx/arm/hooks-mysql.rst
new file mode 100644 (file)
index 0000000..7f4864a
--- /dev/null
@@ -0,0 +1,24 @@
+.. ischooklib:: libdhcp_mysql.so
+.. _hooks-mysql:
+
+``libdhcp_mysql.so``: Database Backend for MySQL
+================================================
+
+This hook library implements MySQL database storage for:
+ - Lease Backend
+ - Host Backend
+ - Configuration Backend
+
+This hook library works in conjunction with :ischooklib:`libdhcp_cb_cmds.so` to
+implement the API to create, read, update, and delete (CRUD) the configuration
+in a MySQL database. Please see :ref:`hooks-cb-cmds` for more details.
+
+.. note::
+
+    :ischooklib:`libdhcp_mysql.so` is part of the open source code and is
+    available to every Kea user. However, this hook library only works with
+    :ischooklib:`libdhcp_cb_cmds.so`, which allows easy configuration
+    management with the use of API commands. :ischooklib:`libdhcp_cb_cmds.so`
+    is available only to ISC customers with a paid support contract; for more
+    information on subscription options, please complete the form at
+    https://www.isc.org/contact.
diff --git a/doc/sphinx/arm/hooks-pgsql.rst b/doc/sphinx/arm/hooks-pgsql.rst
new file mode 100644 (file)
index 0000000..6ef2ee7
--- /dev/null
@@ -0,0 +1,24 @@
+.. ischooklib:: libdhcp_pgsql.so
+.. _hooks-pgsql:
+
+``libdhcp_pgsql.so``: Database Backend for PostgreSQL
+=====================================================
+
+This hook library implements PostgreSQL database storage for:
+ - Lease Backend
+ - Host Backend
+ - Configuration Backend
+
+This hook library works in conjunction with :ischooklib:`libdhcp_cb_cmds.so` to
+implement the API to create, read, update, and delete (CRUD) the configuration
+in a PostgreSQL database. Please see :ref:`hooks-cb-cmds` for more details.
+
+.. note::
+
+    :ischooklib:`libdhcp_pgsql.so` is part of the open source code and is
+    available to every Kea user. However, this hook library only works with
+    :ischooklib:`libdhcp_cb_cmds.so`, which allows easy configuration
+    management with the use of API commands. :ischooklib:`libdhcp_cb_cmds.so`
+    is available only to ISC customers with a paid support contract; for more
+    information on subscription options, please complete the form at
+    https://www.isc.org/contact.
index 43ca9c12c399e6123cdecf3b2d6c624a539b23ed..b661bedfcfc7ff34ebc95047f1e72abf52abf9ad 100644 (file)
@@ -593,10 +593,12 @@ loaded by the correct process per the table below.
    |                                                           |              | which packets receive a response. The limit can be applied   |
    |                                                           |              | per-client class or per-subnet.                              |
    +-----------------------------------------------------------+--------------+--------------------------------------------------------------+
-   | :ref:`MySQL Configuration Backend <hooks-cb-mysql>`       | Kea open     | This hook library is an implementation of the Kea            |
-   |                                                           | source       | Configuration Backend for MySQL. It uses a MySQL database as |
-   |                                                           |              | a repository for the Kea configuration information. Kea      |
-   |                                                           |              | servers use this library to fetch their configurations.      |
+   | :ref:`MySQL Configuration Backend <hooks-mysql>`          | Kea open     | This hook library is an implementation of the Kea Lease,     |
+   |                                                           | source       | Host and Configuration Backend for MySQL. It uses a          |
+   |                                                           |              | MySQL database as a repository for the Kea leases, host      |
+   |                                                           |              | reservations and configuration information. Kea servers use  |
+   |                                                           |              | this library to fetch their configurations if Configuration  |
+   |                                                           |              | Backend is used.                                             |
    +-----------------------------------------------------------+--------------+--------------------------------------------------------------+
    | :ref:`PerfMon <hooks-perfmon>`                            | Kea open     | With this hook library, :iscman:`kea-dhcp4` and              |
    | CURRENTLY EXPERIMENTAL                                    | source       | :iscman:`kea-dhcp6` servers can track and report performance |
@@ -606,11 +608,12 @@ loaded by the correct process per the table below.
    |                                                           | source       | perform ping checks of candidate lease addresses before      |
    |                                                           | customers    | offering them to clients.                                    |
    +-----------------------------------------------------------+--------------+--------------------------------------------------------------+
-   | :ref:`PostgreSQL Configuration Backend <hooks-cb-pgsql>`  | Kea open     | This hook library is an implementation of the Kea            |
-   |                                                           | source       | Configuration Backend for PostgreSQL. It uses a PostgreSQL   |
-   |                                                           |              | database as a repository for the Kea configuration           |
-   |                                                           |              | information. Kea servers use this library to fetch their     |
-   |                                                           |              | configurations.                                              |
+   | :ref:`PostgreSQL Database Backend <hooks-pgsql>`          | Kea open     | This hook library is an implementation of the Kea Lease,     |
+   |                                                           | source       | Host and Configuration Backend for PostgreSQL. It uses a     |
+   |                                                           |              | PostgreSQL database as a repository for the Kea leases, host |
+   |                                                           |              | reservations and configuration information. Kea servers use  |
+   |                                                           |              | this library to fetch their configurations if Configuration  |
+   |                                                           |              | Backend is used.                                             |
    +-----------------------------------------------------------+--------------+--------------------------------------------------------------+
    | :ref:`RADIUS <hooks-radius>`                              | ISC support  | The RADIUS hook library allows Kea to interact with          |
    |                                                           | customers    | RADIUS servers using access and accounting mechanisms. The   |
@@ -685,10 +688,10 @@ sections.
 .. include:: hooks-lease-query.rst
 .. include:: hooks-legal-log.rst
 .. include:: hooks-limits.rst
-.. include:: hooks-cb-mysql.rst
+.. include:: hooks-mysql.rst
 .. include:: hooks-perfmon.rst
 .. include:: hooks-ping-check.rst
-.. include:: hooks-cb-pgsql.rst
+.. include:: hooks-pgsql.rst
 .. include:: hooks-radius.rst
 .. include:: hooks-rbac.rst
 .. include:: hooks-run-script.rst
index 4e4fce0772f2a919d7747c63e0affb0900584140..5b016559a8893f197aa7f2dd59d27959b659d0a3 100644 (file)
@@ -374,7 +374,7 @@ libraries), or hook libraries (open source or premium).
    |                                  |                                       | Forensic Logging               |
    |                                  |                                       | hook library.                  |
    +----------------------------------+---------------------------------------+--------------------------------+
-   | ``kea-dhcp4.mysql-cb-hooks``,    | :ischooklib:`libdhcp_mysql_cb.so`     | Used                           |
+   | ``kea-dhcp4.mysql-cb-hooks``,    | :ischooklib:`libdhcp_mysql.so`        | Used                           |
    | ``kea-dhcp6.mysql-cb-hooks``     | open-source hook library              | to log messages                |
    |                                  |                                       | related to the                 |
    |                                  |                                       | operation of the               |
@@ -382,6 +382,22 @@ libraries), or hook libraries (open source or premium).
    |                                  |                                       | Backend hook                   |
    |                                  |                                       | library.                       |
    +----------------------------------+---------------------------------------+--------------------------------+
+   | ``kea-dhcp4.mysql-hb-hooks``,    | :ischooklib:`libdhcp_mysql.so`        | Used                           |
+   | ``kea-dhcp6.mysql-hb-hooks``     | open-source hook library              | to log messages                |
+   |                                  |                                       | related to the                 |
+   |                                  |                                       | operation of the               |
+   |                                  |                                       | MySQL Host                     |
+   |                                  |                                       | Backend hook                   |
+   |                                  |                                       | library.                       |
+   +----------------------------------+---------------------------------------+--------------------------------+
+   | ``kea-dhcp4.mysql-lb-hooks``,    | :ischooklib:`libdhcp_mysql.so`        | Used                           |
+   | ``kea-dhcp6.mysql-lb-hooks``     | open-source hook library              | to log messages                |
+   |                                  |                                       | related to the                 |
+   |                                  |                                       | operation of the               |
+   |                                  |                                       | MySQL Lease                    |
+   |                                  |                                       | Backend hook                   |
+   |                                  |                                       | library.                       |
+   +----------------------------------+---------------------------------------+--------------------------------+
    | ``kea-dhcp4.options``,           | core                                  | Used by the DHCP               |
    | ``kea-dhcp6.options``            |                                       | server to log                  |
    |                                  |                                       | messages related to            |
@@ -437,7 +453,7 @@ libraries), or hook libraries (open source or premium).
    |                                  |                                       | the operation of the Ping      |
    |                                  |                                       | Check hook library.            |
    +----------------------------------+---------------------------------------+--------------------------------+
-   | ``kea-dhcp4.pgsql-cb-hooks``,    | :ischooklib:`libdhcp_pgsql_cb.so`     | Used                           |
+   | ``kea-dhcp4.pgsql-cb-hooks``,    | :ischooklib:`libdhcp_pgsql.so`        | Used                           |
    | ``kea-dhcp6.pgsql-cb-hooks``     | open-source hook library              | to log messages                |
    |                                  |                                       | related to the                 |
    |                                  |                                       | operation of the               |
@@ -445,6 +461,22 @@ libraries), or hook libraries (open source or premium).
    |                                  |                                       | Backend hook                   |
    |                                  |                                       | library.                       |
    +----------------------------------+---------------------------------------+--------------------------------+
+   | ``kea-dhcp4.pgsql-hb-hooks``,    | :ischooklib:`libdhcp_pgsql.so`        | Used                           |
+   | ``kea-dhcp6.pgsql-hb-hooks``     | open-source hook library              | to log messages                |
+   |                                  |                                       | related to the                 |
+   |                                  |                                       | operation of the               |
+   |                                  |                                       | PostgreSQL Host                |
+   |                                  |                                       | Backend hook                   |
+   |                                  |                                       | library.                       |
+   +----------------------------------+---------------------------------------+--------------------------------+
+   | ``kea-dhcp4.pgsql-lb-hooks``,    | :ischooklib:`libdhcp_pgsql.so`        | Used                           |
+   | ``kea-dhcp6.pgsql-lb-hooks``     | open-source hook library              | to log messages                |
+   |                                  |                                       | related to the                 |
+   |                                  |                                       | operation of the               |
+   |                                  |                                       | PostgreSQL Lease               |
+   |                                  |                                       | Backend hook                   |
+   |                                  |                                       | library.                       |
+   +----------------------------------+---------------------------------------+--------------------------------+
    | ``kea-dhcp4.run-script-hooks``,  | :ischooklib:`libdhcp_run_script.so`   | Used to log messages related   |
    | ``kea-dhcp6.run-script-hooks``   | open-source hook library              | to the operation of the        |
    |                                  |                                       | Run Script hook library.       |
index dc2cf45e41badf4ff0bd1e4ba5dc81079ec6a71e..1163296c71115b911141a4b1d6500080b47bef51 100644 (file)
@@ -28,8 +28,8 @@ rst_arm_sources += arm/hooks-host-cmds.rst
 rst_arm_sources += arm/hooks-lease-cmds.rst
 rst_arm_sources += arm/hooks-lease-query.rst
 rst_arm_sources += arm/hooks-limits.rst
-rst_arm_sources += arm/hooks-cb-mysql.rst
-rst_arm_sources += arm/hooks-cb-pgsql.rst
+rst_arm_sources += arm/hooks-mysql.rst
+rst_arm_sources += arm/hooks-pgsql.rst
 rst_arm_sources += arm/hooks-legal-log.rst
 rst_arm_sources += arm/hooks-perfmon.rst
 rst_arm_sources += arm/hooks-ping-check.rst
index 5d6313eaf11616dce294ca358e32261877864fd0..8ebe94ca595a1224f85c317ca26fcedfa6462eb8 100644 (file)
@@ -124,8 +124,8 @@ exclude_patterns = [
     'arm/hooks-legal-log.rst',
     'arm/hooks-gss-tsig.rst',
     'arm/hooks-host-cmds.rst',
-    'arm/hooks-cb-mysql.rst',
-    'arm/hooks-cb-pgsql.rst',
+    'arm/hooks-mysql.rst',
+    'arm/hooks-pgsql.rst',
     'arm/hooks-limits.rst',
     'arm/hooks-rbac.rst',
     'arm/hooks-run-script.rst',
index 69f1529a01772004ebe0f3bcedf8ffc5e147c759..2b87b77f536c3b195f6578e5c7b71779ce515356 100644 (file)
@@ -7378,8 +7378,9 @@ TEST_F(Dhcp4ParserTest, configControlInfoNoFactory) {
     // Should fail because "type=mysql" has no factories.
     configure(config, CONTROL_RESULT_ERROR,
               "during update from config backend database: "
-              "The type of the configuration backend: "
-              "'mysql' is not supported");
+              "The Kea server has not been compiled with support for database "
+              "type: mysql. Did you forget to use --with-mysql during "
+              "compilation or to load libdhcp_mysql hook library?");
 }
 
 // This test verifies that configuration control info gets populated.
index 1f4af262e92dc9e86e62a98f163ad501aa895c7a..464a61d2366699cf101b48b7c1e35b169c0a5b99 100644 (file)
@@ -8219,8 +8219,9 @@ TEST_F(Dhcp6ParserTest, configControlInfoNoFactory) {
     // Should fail because "type=mysql" has no factories.
     configure(config, CONTROL_RESULT_ERROR,
               "during update from config backend database: "
-              "The type of the configuration backend: "
-              "'mysql' is not supported");
+              "The Kea server has not been compiled with support for database "
+              "type: mysql. Did you forget to use --with-mysql during "
+              "compilation or to load libdhcp_mysql hook library?");
 }
 
 // This test verifies that configuration control info gets populated.
index 55af9dbf61e59f73bc02bd4090a74e5bf3a461a9..44f811b952c8fa1a428a5c99797535c40fb82bdb 100644 (file)
     //       "parameters": {
     //           "identifier-expression": "relay4[2].hex"
     //       }
+    //   },
+    //   {
+    //       // the MySQL host backend hook library required for host storage.
+    //       "library": "@libdir@/kea/hooks/libdhcp_mysql.so"
     //   }
     // ],
 
index 271021b2f86375a6533455811dceb774a0bfedde..d827b759b80ce361f635290f126c495280ee7a11 100644 (file)
     //       "parameters": {
     //           "identifier-expression": "relay6[0].option[37].hex"
     //       }
+    //   },
+    //   {
+    //       // the MySQL host backend hook library required for host storage.
+    //       "library": "@libdir@/kea/hooks/libdhcp_mysql.so"
     //   }
     // ],
 
index 1c7dc168da864cc3e1110beb591ed88179eb0414..c55504d468aa2f1c8e12ff87c02d6f07672bf6f3 100644 (file)
@@ -19,7 +19,7 @@ namespace dhcp {
 
 class MySqlConfigBackendDHCPv4Impl;
 
-/// @brief Implementation of the MySql Configuration Backend for
+/// @brief Implementation of the MySQL Configuration Backend for
 /// Kea DHCPv4 server.
 ///
 /// All POSIX times specified in the methods belonging to this
index c829bf19c1060f60b22a933b3d84f13ada2f8a43..0653997a77e47d167a3a66d8845571d449c8f868 100644 (file)
@@ -19,7 +19,7 @@ namespace dhcp {
 
 class MySqlConfigBackendDHCPv6Impl;
 
-/// @brief Implementation of the MySql Configuration Backend for
+/// @brief Implementation of the MySQL Configuration Backend for
 /// Kea DHCPv6 server.
 ///
 /// All POSIX times specified in the methods belonging to this
index c8b11eb012fd1ccbdbd66fbbb07cec3111389975..2603e076441f5890501ad636af715f4a76d59ac8 100644 (file)
@@ -1823,7 +1823,7 @@ private:
     my_bool              user_context_null_;                       ///< Used when user context is null
 };
 
-/// @brief MySql derivation of the statistical lease data query
+/// @brief MySQL derivation of the statistical lease data query
 ///
 /// This class is used to recalculate lease statistics for MySQL
 /// lease storage.  It does so by executing a query which returns a result
index d78698ae88297ebce8900f23f70d840c035fde5c..8e3e3e4eb2e2cd1bbc4fc0a8ba5c55a805c64083 100644 (file)
@@ -19,7 +19,7 @@ namespace dhcp {
 
 class PgSqlConfigBackendDHCPv4Impl;
 
-/// @brief Implementation of the PgSql Configuration Backend for
+/// @brief Implementation of the PostgreSQL Configuration Backend for
 /// Kea DHCPv4 server.
 ///
 /// All POSIX times specified in the methods belonging to this
index e3f08f5010a139e6d70964c5946d989d73bf76df..9f78faca73d9e96f0ffc70483a6c54b7602b19d0 100644 (file)
@@ -19,7 +19,7 @@ namespace dhcp {
 
 class PgSqlConfigBackendDHCPv6Impl;
 
-/// @brief Implementation of the PgSql Configuration Backend for
+/// @brief Implementation of the PostgreSQL Configuration Backend for
 /// Kea DHCPv6 server.
 ///
 /// All POSIX times specified in the methods belonging to this
index 744ed5434577d0f64e572983ed9fb5cb9cf25228..f0be9d0b7c8e02ab1dc0be64ac0a2aec855b535f 100644 (file)
@@ -1335,7 +1335,7 @@ private:
     //@}
 };
 
-/// @brief Base PgSql derivation of the statistical lease data query
+/// @brief Base PostgreSQL derivation of the statistical lease data query
 ///
 /// This class provides the functionality such as results storage and row
 /// fetching common to fulfilling the statistical lease data query.
index 92d685850e115fe84fd08472ddf8dc2920b627d7..8fc6cfc21df9b9e0ef01d6433575aba2d9dcc34f 100644 (file)
@@ -162,6 +162,14 @@ public:
 
         // No match?
         if (index == factories_.end()) {
+            if ((db_type == "mysql") || (db_type == "postgresql")) {
+                std::string with = (db_type == "postgresql" ? "pgsql" : db_type);
+                isc_throw(db::InvalidType, "The Kea server has not been compiled with "
+                          "support for configuration database type: " << db_type
+                          << ". Did you forget to use --with-"
+                          << with << " during compilation or to load libdhcp_"
+                          << with << " hook library?");
+            }
             isc_throw(db::InvalidType, "The type of the configuration backend: '" <<
                       db_type << "' is not supported");
         }
index 0cc54f0863e309497a76c2b9039a47a3e8b8958a..860c8e5ccfc67ba758282490e3a0a982e63e04e0 100644 (file)
 
   - The MySQL lease manager uses the freely available MySQL as its backend
   database.  This is not included in Kea DHCP by default:
-  the \--with-mysql switch must be supplied to "configure" for support
-  to be compiled into the software.
+  the \--with-mysql switch must be supplied to "configure" for support to be
+  compiled into the software. This will also compile the "libdhcp_mysql.so" hook
+  library which must be loaded by adding it to the "hooks-libraries"
+  configuration parameter.
 
   - The PostgreSQL lease manager uses the freely available PostgreSQL as its
   backend database.  This is not included in Kea DHCP by default:
-  the \--with-pgsql switch must be supplied to "configure" for
-  support to be compiled into the software.
+  the \--with-pgsql switch must be supplied to "configure" for support to be
+  compiled into the software. This will also compile the "libdhcp_pgsql.so" hook
+  library which must be loaded by adding it to the "hooks-libraries"
+  configuration parameter.
 
   @section dhcpdb-instantiation Instantiation of Lease Managers
 
index 446ccc11d0fe6127ef5f18a025b97ee0e278361a..47f1301a3297b77d04692cc0ce46f7a9364b305d 100644 (file)
@@ -49,10 +49,11 @@ HostDataSourceFactory::add(HostDataSourceList& sources,
     if (index == map_.end()) {
         if ((db_type == "mysql") || (db_type == "postgresql")) {
             string with = (db_type == "postgresql" ? "pgsql" : db_type);
-            isc_throw(InvalidType, "The type of host backend: '" << db_type
-                      << "' is not compiled in. Did you forget to use --with-"
+            isc_throw(InvalidType, "The Kea server has not been compiled with "
+                      "support for host database type: " << db_type
+                      << ". Did you forget to use --with-"
                       << with << " during compilation or to load libdhcp_"
-                      << with << "_hb hook library?");
+                      << with << " hook library?");
         }
         isc_throw(InvalidType, "The type of host backend: '" <<
                   db_type << "' is not supported");
index 28936cf3215b1c267fa7bf892ecbb85cbcc8dd9f..40f3388d45f24045fc95d0be9243663982c3d121 100644 (file)
@@ -64,10 +64,10 @@ LeaseMgrFactory::create(const std::string& dbaccess) {
             LOG_ERROR(dhcpsrv_logger, DHCPSRV_UNKNOWN_DB).arg(db_type);
             string with = (db_type == "postgresql" ? "pgsql" : db_type);
             isc_throw(InvalidType, "The Kea server has not been compiled with "
-                      "support for database type: " << db_type
+                      "support for lease database type: " << db_type
                       << ". Did you forget to use --with-"
                       << with << " during compilation or to load libdhcp_"
-                      << with << "_lb hook library?");
+                      << with << " hook library?");
         }
         // Get here on no match
         LOG_ERROR(dhcpsrv_logger, DHCPSRV_UNKNOWN_DB).arg(parameters[type]);
index 803517d4379f7c6b5cc7abf873d711b8972dc8d0..423f1b680ea059737ee58bc81d87d8c500bab25e 100644 (file)
@@ -151,7 +151,7 @@ documentation.
 @subsection postgreSQLHostMgr PostgreSQL Host Reservation Management
 
 Storing and retrieving host reservations within a PostgreSQL schema is
-provided by the class, \ref isc::dhcp::PgSqlHostDataSource, a derivation of
+provided by the class, isc::dhcp::PgSqlHostDataSource, a derivation of
 \ref isc::dhcp::BaseHostDataSource and is depicted in the following
 class diagram:
 
index 89aa08661bc9b980d218f9b6590e251f1e6d36cc..7ffa7262686b66fcf5e92cb79649a4f69843342d 100644 (file)
@@ -25,7 +25,7 @@
         "            \"disabled-by-remote-command\": [],",
         "            \"disabled-by-user\": false,",
         "            \"globally-disabled\": false",
-        "        }",
+        "        },",
         "        \"extended-info-tables\": <whether relay information is held in lease tables>,",
         "        \"high-availability\": [",
         "            {",
@@ -47,7 +47,7 @@
         "                        \"in-touch\": <indicates if this server communicated with partner>,",
         "                        \"last-scopes\": <list of scopes served by partner>,",
         "                        \"last-state\": <HA state name of the partner>,",
-        "                        \"role\": <partner role>",
+        "                        \"role\": <partner role>,",
         "                        \"server-name\": <name of the partner server>,",
         "                        \"system-time\": <system time in format '%Y-%m-%d %H:%M:%S' on UTC timezone>,",
         "                        \"unacked-clients\": <number of unacked clients>,",
@@ -64,9 +64,9 @@
         "        \"sockets\": {",
         "            \"errors\": <list of errors received during the last attempt to open all sockets; only appears when status is failed or retrying>,",
         "            \"status\": <ready, retrying, or failed>",
-        "        }",
+        "        },",
         "        \"thread-pool-size\": 4,",
-        "        \"uptime\": <uptime in seconds>,",
+        "        \"uptime\": <uptime in seconds>",
         "    }",
         "}"
     ],