[Kea-users] Problem when using libdhcp_subnet_cmds.so in kea 2.7.7
Razvan Becheriu
razvan at isc.org
Thu Apr 10 03:40:00 UTC 2025
Hi,
I think you are sending the command to the HA endpoint. That is reserved for HA commands.
Please use the control channel endpoint or CA endpoint instead.
Regards,
Razvan
-----Original Message-----
From: tachibanashita <tachibanashita at outlook.com>
To: kea-users <kea-users at lists.isc.org>
Date: Wednesday, 9 April 2025 9:28 PM EEST
Subject: [Kea-users] Problem when using libdhcp_subnet_cmds.so in kea 2.7.7
Greetings,
I have upgraded my kea lab from 2.6.1 to 2.7.7 and installed the package for hooks. Now I am testing the libdhcp_subnet_cmds.so library.
But I found that I could only run those status check commands successfully, but I am not able to modify any configurations as you can see the examples below. It happened to all the commands which could modify the configuration.
I adjusted the format of my arguments to match the example in your document, but it didn’t work. I added the -u option to curl as the root user, but still not working. Instead of running the curl command remotely, I run it in the same Linux host but still the same. I tried to Google this error but couldn’t find any match including your kea message documentation. I run the curl command against both primary and standby nodes, but still not working.
When I used -v mode for curl command, I can see it does return code 200, so I don’t think it’s other issue than kea hook function itself.
Can you let me know if I missed anything?
Successful tests:
➜ ~ curl -X POST -H "Content-Type: application/json" -d '{ "command": "subnet6-list" }' http://192.168.100.111:8001/ -s | jq
[
{
"arguments": {
"subnets": [
{
"id": 1,
"subnet": "ff12:5656:15e2:10::/64"
}
]
},
"result": 0,
"text": "1 IPv6 subnet found"
}
]
Unsuccessful tests:
➜ ~ curl -X POST -H "Content-Type: application/json" -d '{ "command": "subnet6-del", "arguments": {"id": 1} }' http://192.168.100.111:8001/ -s | jq
[
{
"result": 1,
"text": "invalid thread pool state change to paused performed by worker thread"
}
]
➜ ~ curl -X POST -H "Content-Type: application/json" -d '{ "command": "subnet6-add", "arguments": {"subnet6": [{"id": 2,"subnet": "ff12:5656:15e2:10::/64"}] } }' http://192.168.100.111:8001/ -s | jq
[
{
"result": 1,
"text": "invalid thread pool state change to paused performed by worker thread"
}
]
➜ ~ curl -X POST -H "Content-Type: application/json" -d '{ "command": "subnet6-update", "arguments": {"subnet6": [{"id": 1,"subnet": "ff12:5656:15e2:20::/64"}] } }' http://192.168.100.111:8001/ -s | jq
[
{
"result": 1,
"text": "invalid thread pool state change to paused performed by worker thread"
}
]
Verbose mode:
➜ ~ curl -v -X POST -H "Content-Type: application/json" -d '{ "command": "subnet6-update", "arguments": {"id": 1} }' http://192.168.100.112:8001/ -s | jq
* Trying 192.168.100.112:8001...
* Connected to 192.168.100.112 (192.168.100.112) port 8001
> POST / HTTP/1.1
> Host: 192.168.100.112:8001
> User-Agent: curl/8.7.1
> Accept: */*
> Content-Type: application/json
> Content-Length: 56
>
} [56 bytes data]
* upload completely sent off: 56 bytes
< HTTP/1.1 200 OK
< Content-Length: 100
< Content-Type: application/json
< Date: Wed, 09 Apr 2025 18:21:37 GMT
<
{ [100 bytes data]
* Connection #0 to host 192.168.100.112 left intact
[
{
"result": 1,
"text": "invalid thread pool state change to paused performed by worker thread"
}
]
Best Regards,
Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250410/8f9920a3/attachment-0001.htm>
More information about the Kea-users
mailing list