<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text -->
<style>.EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; }</style></head>
<body>
<font size="2"><div class="PlainText">Hi Darren,<br>
<br>
Thanks for taking the time to test this.   I queried the API for the version and it says 2.4.1.<br>
<br>
I am using the same config lines as you show below, with two exceptions:<br>
On the interfaces, I have specified the address on eth1 that it is to listen on:<br>
<br>
    "interfaces-config": {<br>
        "interfaces": [ "eth1/2a00:e340:1100::32"]<br>
    },<br>
<br>
<br>
Also I have no pool defined because we want to have only static reservations.  I define the subnet.  In your example, it looks like the reservations are within the pool:<br>
<br>
         "subnet6": [<br>
            {<br>
                "id": 1,<br>
                "subnet": "2a00:e340:1102::/64",<br>
            }<br>
        ],<br>
<br>
I've trimmed various unnecessary things out of my config since the first post just to see if it made any difference, but no luck.  I might try reservations by DUID like you're doing to see if the behaviour changes (though we really need flex-id)<br>
<br>
Kind regards,<br>
<br>
Andy<br>
<div style="font-size: 9pt; font-family: Verdana; line-height: 1.2">
  <div>
    <p style="color: rgb(14, 65, 69); font-weight: bold; margin: 0;"><br>Andrew Mulheirn
    </p>
    <p style="color: #727272; margin: 0;">
      Senior Network Architect
    </p>
    <p style="margin: 0;">
      <span style="color: #d4966a">
        M:
      </span>
      <a href="tel:+44 (0) 74 3654 8126" style="text-decoration: none;">
        +44 (0) 74 3654 8126
      </a>
    </p>
    <p style="margin: 0;">
      <span style="color: #d4966a">
        E:
      </span>
      <a href="mailto:andrew.mulheirn@vorboss.com" style="text-decoration: none;">
        andrew.mulheirn@vorboss.com
      </a>
    </p>
    <p style="margin: 0;">
      <a style="text-decoration: none;" href="https://vorboss.com" title="">
        vorboss.com
      </a>
    </p>
  </div>
  <br>
  <div>
    <p style="margin: 0;">
      <span style="color: rgb(114, 114, 114);">
        Not sure who currently provides your internet?
      </span>
      <br>
      <a href="https://check.vorboss.com/" style="text-decoration: none;">
        Find out here and take our speed test.
      </a>
    </p>
  </div>
  <br>
  <div style="font-size: 8pt; color: #9a9a9a;">
    <p style="margin: 0;">
      Disclaimer: This message is private and confidential. If you have received
      this message in error, please remove it from your system and notify us at<span style="color: rgb(154, 154, 154);">
      </span><a href="mailto:sysadmin@vorboss.net" style="text-decoration: none;"><span style="color: rgb(154, 154, 154);">
        sysadmin@vorboss.net
</span>      </a>
      or by telephone <span style="color: rgb(154, 154, 154);">+44(0)20 3582 8500</span>. Any review, retransmission,
      dissemination or other use of, or taking of any action in reliance upon,
      this information by persons or entities other than the intended recipient is
      prohibited.  
      Privacy Note: Vorboss Limited may monitor email traffic data and also the
      content of email for the purposes of security. This email does not create or
      vary any contractual obligations between Vorboss Limited and the intended
      recipient.
    </p>
    <p>
      Vorboss Limited is a limited company registered in England and Wales.
      Registered number: 05678571.
      Registered Office: Vorboss Limited, Broadwalk House, 5 Appold Street,
      London, EC2A 2AG, UNITED KINGDOM.
    </p>
  </div>
</div><br>
-----Original Message-----<br>
From: Darren Ankney <darren.ankney@gmail.com> <br>
Sent: Wednesday, March 13, 2024 9:25 PM<br>
To: Kea user's list <kea-users@lists.isc.org><br>
Cc: Andrew Mulheirn <andrew.mulheirn@vorboss.com><br>
Subject: Re: [Kea-users] API call 'reservation-del' removes all v6 reservations.<br>
<br>
Hi Andy,<br>
<br>
I was not able to reproduce this in 2.4.0.  What version were you using?<br>
<br>
I tested using this simple configuration:<br>
<br>
{<br>
  "Dhcp6": {<br>
    "control-socket": {<br>
      "socket-type": "unix",<br>
      "socket-name": "/tmp/socket6"<br>
    },<br>
    "interfaces-config": {<br>
      "interfaces": [<br>
        "ens256"<br>
      ]<br>
    },<br>
    "hosts-database": {<br>
      "type": "mysql",<br>
      "name": "kea",<br>
      "user": "kea",<br>
      "password": "kea",<br>
    },<br>
    "hooks-libraries": [<br>
      {<br>
        "library": "/usr/local/kea/2.4.0/lib/kea/hooks/libdhcp_host_cmds.so"<br>
      }<br>
    ],<br>
    "subnet6": [<br>
      {<br>
        "id": 1,<br>
        "subnet": "2001:db8::/64",<br>
        "pools": [<br>
          {<br>
            "pool": "2001:db8::aaaa-2001:db8::ffff"<br>
          }<br>
        ]<br>
      }<br>
    ]<br>
  }<br>
}<br>
<br>
I added a host reservation with this command:<br>
<br>
{<br>
  "command": "reservation-add",<br>
  "arguments": {<br>
    "reservation": {<br>
      "subnet-id": 1,<br>
      "duid": "1a:1b:1c:1d:1e:0a",<br>
      "ip-addresses": [ "2001:db8::101" ]<br>
    }<br>
  }<br>
}<br>
<br>
and then another<br>
<br>
{<br>
  "command": "reservation-add",<br>
  "arguments": {<br>
    "reservation": {<br>
      "subnet-id": 1,<br>
      "duid": "1a:1b:1c:1d:1e:0b",<br>
      "ip-addresses": [ "2001:db8::102" ]<br>
    }<br>
  }<br>
}<br>
<br>
I then had two reservations:<br>
<br>
{<br>
  "arguments": {<br>
    "hosts": [<br>
      {<br>
        "client-classes": [],<br>
        "duid": "1a:1b:1c:1d:1e:0a",<br>
        "hostname": "",<br>
        "ip-addresses": [<br>
          "2001:db8::101"<br>
        ],<br>
        "option-data": [],<br>
        "prefixes": [],<br>
        "subnet-id": 1<br>
      },<br>
      {<br>
        "client-classes": [],<br>
        "duid": "1a:1b:1c:1d:1e:0b",<br>
        "hostname": "",<br>
        "ip-addresses": [<br>
          "2001:db8::102"<br>
        ],<br>
        "option-data": [],<br>
        "prefixes": [],<br>
        "subnet-id": 1<br>
      }<br>
    ]<br>
  },<br>
  "result": 0,<br>
  "text": "2 IPv6 host(s) found."<br>
}<br>
<br>
I then deleted one of them by IP address:<br>
<br>
{<br>
    "command": "reservation-del",<br>
    "arguments": {<br>
        "subnet-id": 1,<br>
        "ip-address": "2001:db8::101"<br>
    }<br>
}<br>
<br>
and still had one reservation left:<br>
<br>
{<br>
  "arguments": {<br>
    "hosts": [<br>
      {<br>
        "client-classes": [],<br>
        "duid": "1a:1b:1c:1d:1e:0b",<br>
        "hostname": "",<br>
        "ip-addresses": [<br>
          "2001:db8::102"<br>
        ],<br>
        "option-data": [],<br>
        "prefixes": [],<br>
        "subnet-id": 1<br>
      }<br>
    ]<br>
  },<br>
  "result": 0,<br>
  "text": "1 IPv6 host(s) found."<br>
}<br>
<br>
<br>
On Mon, Mar 11, 2024 at 11:19 AM Andrew Mulheirn via Kea-users <kea-users@lists.isc.org> wrote:<br>
><br>
> Hi all,<br>
><br>
><br>
><br>
> I've noticed that using reservation-del against dhcp6 removes *all* reservations, while doing the same against dhcp4 behaves as expected and removes just the reservation that was specified.   I can't see why they behave differently.<br>
><br>
><br>
><br>
> I have made reservations for 2a00:e340:1102::3 and 2a00:e340:1102::4 and can see them both when I do a reservation-get-all.<br>
><br>
><br>
><br>
> Then I try to delete one of them.  Here is the call I am making for v6:<br>
><br>
> {<br>
><br>
>     "command": "reservation-del",<br>
><br>
>     "service": ["dhcp6"],<br>
><br>
>     "arguments": {<br>
><br>
>         "subnet-id": 1,<br>
><br>
>         "ip-address": "2a00:e340:1102::3"<br>
><br>
>     }<br>
><br>
> }<br>
><br>
><br>
><br>
><br>
><br>
> When I look at the debug, I see messages just deleting this one reservation:<br>
><br>
> INFO  COMMAND_RECEIVED Received command 'reservation-del'<br>
><br>
> DEBUG HOOKS_CALLOUTS_BEGIN begin all callouts for hook <br>
> $reservation_del<br>
><br>
> INFO  HOST_CMDS_RESERV_DEL reservation-del command called (parameters: <br>
> { "ip-address": "2a00:e340:1102::3", "subnet-id": 1 })<br>
><br>
> INFO  HOST_CMDS_RESERV_DEL_SUCCESS reservation-del command success <br>
> (parameters: { "ip-address": "2a00:e340:1102::3", "subnet-id": 1 })<br>
><br>
> DEBUG HOOKS_CALLOUT_CALLED hooks library with index 2 has called a <br>
> callout on hook $reservation_del that has address 0x7ff2f67cecb0 <br>
> (callout duration: 5.882 ms)<br>
><br>
> DEBUG HOOKS_CALLOUTS_COMPLETE completed callouts for hook <br>
> $reservation_del (total callouts duration: 5.882 ms)<br>
><br>
><br>
><br>
><br>
><br>
> However, when I do another reservation-get-all, the table is now empty:<br>
><br>
> [<br>
><br>
>     {<br>
><br>
>         "arguments": {<br>
><br>
>             "hosts": []<br>
><br>
>         },<br>
><br>
>         "result": 3,<br>
><br>
>         "text": "0 IPv6 host(s) found."<br>
><br>
>     }<br>
><br>
> ]<br>
><br>
><br>
><br>
><br>
><br>
> As I say, v4 works fine.   Any pointers would be most welcome,<br>
><br>
><br>
><br>
> Cheers,<br>
><br>
> Andy<br>
><br>
><br>
> Andrew Mulheirn<br>
><br>
> Senior Network Architect<br>
><br>
> M: +44 (0) 74 3654 8126<br>
><br>
> E: andrew.mulheirn@vorboss.com<br>
><br>
> vorboss.com<br>
><br>
><br>
> Not sure who currently provides your internet?<br>
> Find out here and take our speed test.<br>
><br>
><br>
> Disclaimer: This message is private and confidential. If you have received this message in error, please remove it from your system and notify us at sysadmin@vorboss.net or by telephone +44(0)20 3582 8500. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited.   Privacy Note: Vorboss Limited may monitor email traffic data and also the content of email for the purposes of security. This email does not create or vary any contractual obligations between Vorboss Limited and the intended recipient.<br>
><br>
> Vorboss Limited is a limited company registered in England and Wales. Registered number: 05678571. Registered Office: Vorboss Limited, Broadwalk House, 5 Appold Street, London, EC2A 2AG, UNITED KINGDOM.<br>
><br>
> --<br>
> ISC funds the development of this software with paid support subscriptions. Contact us at <a href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.<br>
><br>
> To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
><br>
> Kea-users mailing list<br>
> Kea-users@lists.isc.org<br>
> <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</div></font>
</body>
</html>