From: Otto Moerbeek Date: Fri, 13 Oct 2023 07:40:09 +0000 (+0200) Subject: Docs X-Git-Tag: rec-5.0.0-alpha2~1^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc17048bce3ee6bd1515cedf61cccdcdc57af96d;p=thirdparty%2Fpdns.git Docs --- diff --git a/pdns/recursordist/docs/appendices/yamlconversion.rst b/pdns/recursordist/docs/appendices/yamlconversion.rst index d3c263cf7c..ed2f83dbdb 100644 --- a/pdns/recursordist/docs/appendices/yamlconversion.rst +++ b/pdns/recursordist/docs/appendices/yamlconversion.rst @@ -59,5 +59,7 @@ API Managed Files The format of API managed files was also changed to use YAML format. Specifically, the list of API managed zones is now a single file containing a sequence of ``auth_zones`` and a sequence of ``forward_zones`` instead of a settings file per zone. The list of ACLs is a YAML sequence of subnets or IP addresses. -There is no conversion of API managed files from old-style to YAML yet. -The intention is to add automatic conversion code before the final release of a YAML enabled :program:`Recursor`, +When using YAML settings :ref:`setting-yaml-recursor.include-dir` and :ref:`setting-yaml-webservice.api-config-dir` must have a different value. +When YAML settings are active the :program:`Recursor` will read old-style API managed files from the include directory on startup, convert them to the new format and write them into the API config directory. +After conversion, it will inactivate the old-style API managed config files in the include directory by renaming them. + diff --git a/pdns/recursordist/docs/http-api/endpoint-servers-config.rst b/pdns/recursordist/docs/http-api/endpoint-servers-config.rst index 0d96dbd9e8..0d8f24c6b8 100644 --- a/pdns/recursordist/docs/http-api/endpoint-servers-config.rst +++ b/pdns/recursordist/docs/http-api/endpoint-servers-config.rst @@ -8,7 +8,8 @@ Only :ref:`setting-allow-from` and :ref:`setting-allow-notify-from` can be set. .. note:: - For configuration changes to work :ref:`setting-include-dir` and :ref:`setting-api-config-dir` should have the same value. + For configuration changes to work :ref:`setting-include-dir` and :ref:`setting-api-config-dir` should have the same value for old-style settings. + When using YAML settings :ref:`setting-yaml-recursor.include_dir` and :ref:`setting-yaml-webservice.api_dir` must have a different value. :param server_id: The name of the server :param config_setting_name: The name of the setting to change diff --git a/pdns/recursordist/docs/http-api/zone.rst b/pdns/recursordist/docs/http-api/zone.rst index bece530b28..35e69ed4c3 100644 --- a/pdns/recursordist/docs/http-api/zone.rst +++ b/pdns/recursordist/docs/http-api/zone.rst @@ -32,7 +32,8 @@ be true: command line. Setting these options on the command line will override what has been set in the dynamically generated configuration files. -* ``include-dir`` must refer to the same directory as - ``api-config-dir`` for the dynamic reloading to work. + +* For configuration changes to work :ref:`setting-include-dir` and :ref:`setting-api-config-dir` should have the same value for old-style settings. + When using YAML settings :ref:`setting-yaml-recursor.include_dir` and :ref:`setting-yaml-webservice.api_dir` must have a different value. .. include:: ../common/api/zone.rst diff --git a/pdns/recursordist/settings/table.py b/pdns/recursordist/settings/table.py index e833fb6564..d521ea8238 100644 --- a/pdns/recursordist/settings/table.py +++ b/pdns/recursordist/settings/table.py @@ -225,7 +225,8 @@ Allow ``trustanchor.server CH TXT`` and ``negativetrustanchor.server CH TXT`` qu 'help' : 'Directory where REST API stores config and zones', 'doc' : ''' Directory where the REST API stores its configuration and zones. -For configuration updates to work, :ref:`setting-include-dir` should have the same value. +For configuration updates to work, :ref:`setting-include-dir` should have the same value when using old-style settings. +When using YAML settings :ref:`setting-yaml-recursor.include_dir` and :ref:`setting-yaml-webservice.api_dir` must have a different value. ''', 'versionadded': '4.0.0' }, @@ -2119,7 +2120,7 @@ Individual parts of these zones can still be loaded or forwarded. }, { 'name' : 'serve_stale_extensions', - 'section' : 'recursor', + 'section' : 'recordcache', 'type' : LType.Uint64, 'default' : '0', 'help' : 'Number of times a record\'s ttl is extended by 30s to be served stale',