[Kea-users] Kea lease4-get-all via kea-ctrl-agent

Peter Simm pete at simmweb.co.uk
Tue Mar 3 01:28:11 UTC 2020


Hello,

I have the paid hooks. I'm using MySQL as a backend and it's working fine.
Now I am trying to get the kea-ctrl agent to behave using curl. I've
started the daemon, which I think is ok. This works:

# curl -X POST -H "Content-Type: application/json" -d '{ "command":
"list-commands"}' http://127.0.0.1:8080  | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100   449  100   420  100    29   389k  27566 --:--:-- --:--:-- --:--:--
 410k
[
  {
    "arguments": [
      "build-report",
      "config-get",
      "config-test",
      "config-write",
      "lease4-add",
      "lease4-del",
      "lease4-get",
      "lease4-get-all",
      "lease4-get-page",
      "lease4-update",
      "lease4-wipe",
      "lease6-add",
      "lease6-del",
      "lease6-get",
      "lease6-get-all",
      "lease6-get-page",
      "lease6-update",
      "lease6-wipe",
      "list-commands",
      "reservation-add",
      "reservation-del",
      "reservation-get",
      "shutdown",
      "version-get"
    ],
    "result": 0
  }
]

This does not though:

# curl -X POST -H "Content-Type: application/json" -d '{ "command":
"lease4-get-all"}' http://127.0.0.1:8080  | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time
 Current
                                 Dload  Upload   Total   Spent    Left
 Speed
100    98  100    68  100    30   5691   2511 --:--:-- --:--:-- --:--:--
 6181
[
  {
    "result": 1,
    "text": "no current lease manager is available"
  }
]

I have 1.5.0 of kea and hooks, and I think according to this page, I should
be able to get all leases if I don't specify any arguements:

https://ftp.isc.org/isc/kea/1.5.0/doc/kea-guide.html#command-lease4-get-all

I see this error in the kea-ctrl-agent log:

2020-03-03 01:22:32.053 ERROR [kea-ctrl-agent.callouts/26800]
HOOKS_CALLOUT_ERROR error returned by callout on hook 1 registered by
library with index
$lease4_get_all (callout address 0x7f172e322b40) (callout duration 0.059 ms)

Any help much appreciated!  Thanks for helping create such a great service!

All the best,
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20200303/35918c18/attachment.htm>


More information about the Kea-users mailing list