Using OMAPI to release a DHCP lease on a failover pair

Gregory Sloop gregs at sloop.net
Thu Jul 30 19:38:21 UTC 2020


I've been messing with this recently - OMSHell, not releasing leases - and IIRC [and I may well not, but take it for what it's worth]...
you have to expire the lease and then release it.

You can't go from an active lease to released in one step.

I think there are some details in the list that I recall reading recently - which is why I *vaguely* know. :)

HTH
-Greg

IO> Hello,

IO> I am having some issues getting the OMAPI method for setting a lease to the
IO> released state to work, in order to allow a new client to get the lease. The
IO> servers in question are in a failover pair. The guidance that I have seen
IO> recommends to do the following to manually release a lease on the server
IO> side via OMAPI:

IO> server x.x.x.x
IO> port 7911
IO> key omapi_key (key)
IO> connect
IO> new lease
IO> set ip-address = 1.1.1.1
IO> open
IO> set state = 4
IO> update

IO> In this case, the pool contains only a single address, and it doesn't seem
IO> to work whether I make the change on the just the primary or both the
IO> primary and secondary. In either case, I get the following logs (with the
IO> exception of the state change on the secondary when I have tried not making
IO> any change there):

IO> Primary:
IO> Jul 30 14:02:54 loc3 dhcpd[25263]: lease 1.1.1.1 state changed from active
IO> to released
IO> Jul 30 14:02:58 loc3 dhcpd[25263]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: network 1.1.1.0/31: no free leases
IO> Jul 30 14:03:01 loc3 dhcpd[25263]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: network 1.1.1.0/31: no free leases
IO> Jul 30 14:03:04 loc3 dhcpd[25263]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: network 1.1.1.0/31: no free leases
IO> Jul 30 14:03:07 loc3 dhcpd[25263]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: network 1.1.1.0/31: no free leases

IO> Secondary:
IO> Jul 30 14:02:55 loc36 dhcpd[19842]: lease 1.1.1.1 state changed from free to
IO> released
IO> Jul 30 14:02:58 loc36 dhcpd[19842]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: peer holds all free leases
IO> Jul 30 14:03:01 loc36 dhcpd[19842]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: peer holds all free leases
IO> Jul 30 14:03:04 loc36 dhcpd[19842]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: peer holds all free leases
IO> Jul 30 14:03:07 loc36 dhcpd[19842]: DHCPDISCOVER from aa:bb:cc:dd:ee:ff via
IO> 1.1.1.0: peer holds all free leases

IO> The pre-existing lease was for a different MAC address than
IO> aa:bb:cc:dd:ee:ff. The device with the old MAC address is still the only one
IO> that is able to get a new lease, even after releasing that lease via OMAPI.
IO> Any guidance on how to get this to work in this case would be appreciated. I
IO> am not sure if the existence of the failover configuration is the cause of
IO> the issue, or if there is another reason for this behavior, but there don't
IO> seem to be any errors or any other info returned by OMAPI which indicate why
IO> this might be happening.

IO> Thanks,
IO> Isaiah

IO> _______________________________________________
IO> ISC funds the development of this software with paid support
IO> subscriptions. Contact us at https://www.isc.org/contact/ for more information.

IO> dhcp-users mailing list
IO> dhcp-users at lists.isc.org
IO> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Gregory Sloop, Principal: Sloop Network & Computer Consulting
Voice: 503.251.0452 x121
EMail: gregs at sloop.net
http://www.sloop.net
---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20200730/506a12ea/attachment.htm>


More information about the dhcp-users mailing list