]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3984] updated docs regarding kea-dhcp6-serverid and KEA_DHCP_DATA_DIR
authorRazvan Becheriu <razvan@isc.org>
Thu, 7 Aug 2025 09:26:21 +0000 (12:26 +0300)
committerRazvan Becheriu <razvan@isc.org>
Mon, 11 Aug 2025 04:58:45 +0000 (04:58 +0000)
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/hooks-host-cache.rst
doc/sphinx/arm/hooks-legal-log.rst
doc/sphinx/arm/install.rst
doc/sphinx/arm/keactrl.rst
doc/sphinx/arm/quickstart.rst
doc/sphinx/arm/security.rst
doc/sphinx/man/keactrl.8.rst
src/bin/dhcp4/tests/kea_controller_unittest.cc

index b2809051858fe1321f91a29e76c66d284445d699..268804cf1db1eaf995c9c3bd8c8beabee7a15800 100644 (file)
@@ -6417,7 +6417,10 @@ which will result in the following server identifier:
    |type |htype|   identifier    |
 
 The server stores the generated server identifier in the following
-location: ``[kea-install-dir]/var/lib/kea/kea-dhcp6-serverid``.
+location: ``"[kea-install-dir]/var/lib/kea/kea-dhcp6-serverid"``.
+
+As of Kea 2.7.9, this path may be overridden at startup by setting the
+environment variable ``KEA_DHCP_DATA_DIR`` to the desired path.
 
 In some uncommon deployments where no stable storage is available, the
 server should be configured not to try to store the server identifier.
@@ -6452,8 +6455,8 @@ DHCPv6 Data Directory
 
 The Kea DHCPv6 server puts the server identifier file and the default
 memory lease file into its data directory. By default this directory is
-``prefix/var/lib/kea`` but this location can be changed using the
-``data-directory`` global parameter, as in:
+``"[kea-install-dir]/var/lib/kea"`` but this location can be changed
+using the ``data-directory`` global parameter, as in:
 
 ::
 
index f887cf295fba9a2232c841383191471955e891d9..3a3cc18be1285b5d03ac0ab7fd1d0edcc672ef48 100644 (file)
@@ -137,10 +137,10 @@ example usage looks as follows:
 
    {
        "command": "cache-write",
-       "arguments": "/usr/local/var/lib/kea/kea-host-cache.json"
+       "arguments": "/var/lib/kea/kea-host-cache.json"
    }
 
-This causes the contents to be stored in the ``/usr/local/var/lib/kea/kea-host-cache.json``
+This causes the contents to be stored in the ``/var/lib/kea/kea-host-cache.json``
 file. That file can then be loaded with the :isccmd:`cache-load` command or
 processed by any other tool that is able to understand JSON format.
 
index a36e3beb3773aa689d20bdeb860f7b270adb08c6..99143fe4346ff43e0ceac080ed8993b12b706a93 100644 (file)
@@ -85,7 +85,7 @@ configuration of the desired DHCP server modules. :ischooklib:`libdhcp_legal_log
 can save logs to a text file or to a database (created using
 :iscman:`kea-admin`; see :ref:`mysql-database-create` and :ref:`pgsql-database-create`).
 The library is installed alongside the Kea libraries in
-``[kea-install-dir]/var/log/kea``, where ``kea-install-dir`` is determined
+``"[kea-install-dir]/var/log/kea"``, where ``kea-install-dir`` is determined
 by the ``--prefix`` meson setup option which defaults to
 ``/usr/local``. Assuming the default value, :iscman:`kea-dhcp4` can be configured to load
 :ischooklib:`libdhcp_legal_log.so` like this:
@@ -127,7 +127,7 @@ For :iscman:`kea-dhcp6`, the configuration is:
 The hook library parameters for the text file configuration are:
 
 -  ``path`` - the directory in which the forensic file(s) will be written.
-   The default value is ``[kea-install-dir]/var/log/kea``. The directory
+   The default value is ``"[kea-install-dir]/var/log/kea"``. The directory
    must exist.
 
 .. note::
index 0006de091db64bc3096b5a9122cf15d8e1ec2d98..b3bffc772652e68b744ab13c2872a5eac6c515fa 100644 (file)
@@ -132,7 +132,7 @@ The following is the directory layout of the complete Kea installation.
 
 -  ``share/man/`` — manual pages (online documentation).
 
--  ``var/lib/kea/`` — server identification and lease database files.
+-  ``var/lib/kea/`` — server identifier (DHCPv6) and lease database files.
 
 -  ``var/log/kea/`` - log files.
 
index 93768c3754ffe44897d4d3d07bf9cdccb495335f..a5ac191abe49db9c848b4ef9a2911a92e70710fa 100644 (file)
@@ -35,7 +35,7 @@ Command Line Options
 The optional ``-c keactrl-config-file`` switch allows specification of
 an alternate :iscman:`keactrl` configuration file. (``--ctrl-config`` is a
 synonym for ``-c``.) In the absence of ``-c``, :iscman:`keactrl` uses the
-default configuration file ``[kea-install-dir]/etc/kea/keactrl.conf``.
+default configuration file ``"[kea-install-dir]/etc/kea/keactrl.conf"``.
 
 The optional ``-s server[,server,...]`` switch selects the servers to
 which the command is issued. (``--server`` is a synonym for ``-s``.) If
@@ -52,7 +52,7 @@ Depending on the administrator's requirements, it may not be
 necessary to run all of the available servers.
 The :iscman:`keactrl` configuration file sets which servers are enabled and
 which are disabled. The default configuration file is
-``[kea-install-dir]/etc/kea/keactrl.conf``, but this can be overridden
+``"[kea-install-dir]/etc/kea/keactrl.conf"``, but this can be overridden
 on a per-command basis using the ``-c`` switch.
 
 The contents of ``keactrl.conf`` are:
@@ -113,7 +113,7 @@ corresponding server when starting or reconfiguring Kea. Some daemons
 (dhcp_ddns and netconf) are disabled by default.
 
 By default, Kea servers managed by :iscman:`keactrl` are located in
-``[kea-install-dir]/sbin``. This should work for most installations. If
+``"[kea-install-dir]/sbin"``. This should work for most installations. If
 the default location needs to be altered, the paths
 specified with the ``dhcp4_srv``, ``dhcp6_srv``, ``dhcp_ddns_srv``,
 ``ctrl_agent_srv``, and ``netconf_srv`` parameters should be modified.
index cb7950d5096afe82cd24a83449064aa0d21209ef..2f96b35d5ce784d0cebadd0bef61c733bbb1f412 100644 (file)
@@ -308,7 +308,7 @@ Quick Start Guide for DHCPv4 and DHCPv6 Services
 ================================================
 
 1.  Edit the Kea configuration files, which by default are installed in
-    the ``[kea-install-dir]/etc/kea/`` directory. These are:
+    the ``"[kea-install-dir]/etc/kea/"`` directory. These are:
     ``kea-dhcp4.conf``, ``kea-dhcp6.conf``, ``kea-dhcp-ddns.conf`` and
     ``kea-ctrl-agent.conf``, ``keactrl.conf`` for the DHCPv4 server, DHCPv6 server,
     D2, Control Agent, and keactrl script, respectively.
@@ -340,10 +340,10 @@ Quick Start Guide for DHCPv4 and DHCPv6 Services
 
     A server status of "inactive" may indicate a configuration error.
     Please check the log file (by default named
-    ``[kea-install-dir]/var/log/kea/kea-dhcp4.log``,
-    ``[kea-install-dir]/var/log/kea/kea-dhcp6.log``,
-    ``[kea-install-dir]/var/log/kea/kea-ddns.log``, or
-    ``[kea-install-dir]/var/log/kea/kea-ctrl-agent.log``) for the details of
+    ``"[kea-install-dir]/var/log/kea/kea-dhcp4.log"``,
+    ``"[kea-install-dir]/var/log/kea/kea-dhcp6.log"``,
+    ``"[kea-install-dir]/var/log/kea/kea-ddns.log"``, or
+    ``"[kea-install-dir]/var/log/kea/kea-ctrl-agent.log"``) for the details of
     any errors.
 
 4.  If the server has started successfully, test that it is
index b8e71c056f0ed9520b855afcdb2912d96f648a54..ddabdf77180848ceaff25cd68f92f2b0246a2f78 100644 (file)
@@ -305,6 +305,8 @@ Potential Kea security issues can be minimized by running only those processes r
     omit the path portion from ``filename``. Same restriction also applies to
     writing cache file using ``cache-write`` command. For ease of use in
     specifying a custom file name simply omit the path portion from ``filename``.
+    The ``KEA_DHCP_DATA_DIR`` environment variable is also used to change the default
+    location for the generated DHCPv6 server identifier file (kea-dhcp6-serverid).
 
 Limiting Application Permissions
 --------------------------------
@@ -425,13 +427,15 @@ the following table:
 +-------------------------------------+---------------------------------------+-------------------------------+
 | Lease Files                         | ``var/lib/kea``                       | ``KEA_DHCP_DATA_DIR``         |
 +-------------------------------------+---------------------------------------+-------------------------------+
+| DHCPv6 Server Identifier File       | ``var/lib/kea``                       | ``KEA_DHCP_DATA_DIR``         |
++-------------------------------------+---------------------------------------+-------------------------------+
 | Log Files                           | ``var/log/kea``                       | ``KEA_LOG_FILE_DIR``          |
 +-------------------------------------+---------------------------------------+-------------------------------+
 | Forensic Log Files                  | ``var/log/kea``                       | ``KEA_LEGAL_LOG_DIR``         |
 +-------------------------------------+---------------------------------------+-------------------------------+
 | Unix Sockets                        | ``var/run/kea``                       | ``KEA_CONTROL_SOCKET_DIR``    |
 +-------------------------------------+---------------------------------------+-------------------------------+
-| Scripts used by hook libraries      | ``share/kea/scripts/``                | ``KEA_HOOK_SCRIPTS_PATH``     |
+| Scripts Used By Hook Libraries      | ``share/kea/scripts/``                | ``KEA_HOOK_SCRIPTS_PATH``     |
 +-------------------------------------+---------------------------------------+-------------------------------+
 
 .. note:
index be8a7224b4fe632379393ac1611adf3187802442..a338ff21e81a6a512ab95ad44f3eb62513ec50ea 100644 (file)
@@ -33,7 +33,7 @@ Configuration File
 Depending on the user's requirements, not all of the available servers need be run.
 The ``keactrl`` configuration file specifies which servers are enabled and which
 are disabled. By default the configuration file is
-``[kea-install-dir]/etc/kea/keactrl.conf``.
+``"[kea-install-dir]/etc/kea/keactrl.conf"``.
 
 See the Kea Administrator Reference Manual for documentation of the
 parameters in the ``keactrl`` configuration file.
@@ -60,7 +60,7 @@ Options
 ``-c|--ctrl-config keactrl-config-file``
    Specifies the ``keactrl`` configuration file. Without this switch,
    ``keactrl`` uses the file
-   ``[kea-install-dir]/etc/kea/keactrl.conf``.
+   ``"[kea-install-dir]/etc/kea/keactrl.conf"``.
 
 ``-s|--server server[,server,...]``
    Specifies a subset of the enabled servers to which the command should
index 0625ad23b0721e2dd881f72bc50e2ecdcc100214..fb4774d8014e9a2d5bae1cfc0ba6877e1baead73 100644 (file)
@@ -782,7 +782,7 @@ TEST_F(JSONFileBackendTest, configBroken) {
 ///
 /// @todo: Unfortunately, we have this test disabled, because all loaded
 /// configs use memfile, which attempts to create lease file in
-/// /usr/local/var/lib/kea/kea-leases4.csv. We have couple options here:
+/// /var/lib/kea/kea-leases4.csv. We have couple options here:
 /// a) disable persistence in example configs - a very bad thing to do
 ///    as users will forget to reenable it and then will be surprised when their
 ///    leases disappear