2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 01:49:48 +00:00

[#3984] updated docs regarding kea-dhcp6-serverid and KEA_DHCP_DATA_DIR

This commit is contained in:
Razvan Becheriu 2025-08-07 12:26:21 +03:00
parent 6eac84f28b
commit 80c7cc97f6
9 changed files with 27 additions and 20 deletions

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

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

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

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

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

View 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

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

View 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

View 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