reservation-get-page command result for RADIUS backend
Describe the bug
The user configured Kea to use RADIUS as the host backend.
The reservation-get-page
command (and similar) returns a general error. For example:
$ kea-shell --host 127.0.0.1 --port 8000 --service dhcp4 reservation-get-page
"subnet-id": 1, "limit": 10
^D
[ { "result": 1, "text": "not supported by the RADIUS backend" } ]
I think that the result should be different.
The first proposal is to return status 2 (unsupported). It will be consistent with the error description.
The second prosal is to skip the RADIUS backend for this command. Currently, if the user has other host databases configured simultaneously, it is impossible to query them using host commands.
To Reproduce
Steps to reproduce the behavior:
- Run Kea DHCP daemon (I tested it only on the DHCPv4 daemon and Kea 1.8, 2.0, and 2.2) with
hosts_cmds
,host_cache
, andradius
hooks. - Generate some network traffic. It is necessary to activate the RADIUS host backend.
- Send the
reservations-get-page
orreservations-get-all
command - Observe an error with the
result
property equal to 1.
Expected behavior
Skip querying the unsupported host backend for the above commands (recommended) or return an unsupported status (result
property equal to 2).
Environment:
- Kea version: Kea 1.8, 2.0, and 2.2 installed from the premium CloudSmith packages. (The user reports that he used the standard ones).
- Kea hooks: hosts_cmds, host_cache, and radius
- OS: Debian 10, 11, and RHEL 8.5
- Which features were compiled in (in particular which backends): I used the official CloudSmith packages.
Additional Information
The problem was originally described in stork#792 (closed). The reporter attached the configuration file, short parts of logs, and other details.
We will handle this problem on the Stork side because it affects already released Kea versions. But it'll be nice to change it in Kea for consistency.
Contacting you
I'm where I'm always. An original reporter is @vps-eric.