From: Aleš Mrázek Date: Thu, 14 Nov 2024 18:45:41 +0000 (+0100) Subject: default API socket update X-Git-Tag: v6.0.10~20^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5706e44fd4c3a291b19d04161dacc66fdf9866e7;p=thirdparty%2Fknot-resolver.git default API socket update - tests/packaging/interactive - etc/config/config.yaml - documentation --- diff --git a/doc/kresctl.8.in b/doc/kresctl.8.in index 538356afc..d8770ca07 100644 --- a/doc/kresctl.8.in +++ b/doc/kresctl.8.in @@ -32,7 +32,7 @@ The available options are: .B \-s\fI \fR, \fB\-\-socket \fI Specify how to connect to a running Knot Resolver. Accepts path to Unix-domain -socket or \fIhost:port\fR. Defaults to \fI/var/run/knot-resolver/manager.sock\fR +socket or \fIhost:port\fR. Defaults to \fI/var/run/knot-resolver/kres-api.sock\fR Some commands do not require communication with the running resolver. In such cases, the value of this option is ignored and the command may succeed even diff --git a/doc/user/config-overview.rst b/doc/user/config-overview.rst index 15cb9f629..b42ee0a39 100644 --- a/doc/user/config-overview.rst +++ b/doc/user/config-overview.rst @@ -54,7 +54,7 @@ Getting the JSON Schema * The JSON schema can be `downloaded here <_static/config.schema.json>`_ (valid only for the version of the resolver this documentation was generated for). * The :ref:`kresctl schema ` command outputs the JSON schema of the currently installed version as well. It does not require a running resolver. -* The JSON schema can also be obtained from a running resolver by sending a HTTP GET request to the path ``/schema`` on the :ref:`management API ` (by default a Unix socket at ``/var/run/knot-resolver/manager.sock``). +* The JSON schema can also be obtained from a running resolver by sending a HTTP GET request to the path ``/schema`` on the :ref:`management API ` (by default a Unix socket at ``/run/knot-resolver/kres-api.sock``). .. tip:: diff --git a/doc/user/manager-api.rst b/doc/user/manager-api.rst index 21efb350b..db7754e6f 100644 --- a/doc/user/manager-api.rst +++ b/doc/user/manager-api.rst @@ -11,7 +11,7 @@ Management HTTP API =================== You can use HTTP API to dynamically change configuration of already running Knot Resolver. -By default the API is configured as UNIX domain socket located in the resolver's rundir ``/var/run/knot-resolver/manager.sock``. +By default the API is configured as UNIX domain socket located in the resolver's rundir ``/run/knot-resolver/kres-api.sock``. This socket is used by ``kresctl`` utility in default. The API setting can be changed only in ``/etc/knot-resolver/config.yaml`` configuration file: diff --git a/doc/user/manager-client.rst b/doc/user/manager-client.rst index 61ff2fff0..abeab2c93 100644 --- a/doc/user/manager-client.rst +++ b/doc/user/manager-client.rst @@ -34,7 +34,7 @@ where to look for the API. If the :ref:`management ` key is not present in the configuration file, ``kresctl`` attempts to connect to the -``/var/run/knot-resolver/manager.sock`` Unix-domain socket, which is the +``/run/knot-resolver/kres-api.sock`` Unix-domain socket, which is the Manager's default communication channel. By default, ``kresctl`` tries to find the correct communication channel in diff --git a/etc/config/config.yaml b/etc/config/config.yaml index cf4da9291..771a931f0 100644 --- a/etc/config/config.yaml +++ b/etc/config/config.yaml @@ -8,4 +8,4 @@ network: listen: - interface: 127.0.0.1@53 management: - unix-socket: /run/knot-resolver/manager.sock + unix-socket: /run/knot-resolver/kres-api.sock diff --git a/tests/packaging/interactive/etag.sh b/tests/packaging/interactive/etag.sh index 3a9de46cc..7038e0069 100755 --- a/tests/packaging/interactive/etag.sh +++ b/tests/packaging/interactive/etag.sh @@ -2,7 +2,7 @@ set -e -socket_opt="--unix-socket /var/run/knot-resolver/manager.sock" +socket_opt="--unix-socket /run/knot-resolver/kres-api.sock" echo " etag" etag="$(curl --silent $socket_opt --fail http://localhost:5000/v1/config -o /dev/null -v 2>&1 | grep ETag | sed 's/< ETag: //;s/\s//')" diff --git a/tests/packaging/interactive/metrics.sh b/tests/packaging/interactive/metrics.sh index 63ac035d2..99b21124d 100755 --- a/tests/packaging/interactive/metrics.sh +++ b/tests/packaging/interactive/metrics.sh @@ -2,7 +2,7 @@ set -e -curl --silent --fail --unix-socket /var/run/knot-resolver/manager.sock http://localhost/metrics > /dev/null +curl --silent --fail --unix-socket /run/knot-resolver/kres-api.sock http://localhost/metrics > /dev/null kresctl metrics if [ "$?" -ne "0" ]; then