key conflict message for create host by Omapi

dave c dhcp at gvtc.drakkar.org
Mon Oct 26 14:56:28 UTC 2015


What are you setting the "key" to in your OMAPI call? If you are using the MAC Address or the 
customer name, there's your problem right there.

I suggest you use the MAC and the IP address for the KEY so that it's unique per instance. The 
MAC address is a field specified elsewhere in the OMAPI call.

The KEY can be anything, as long as it's unique.

BTW, disabling the unique key check on a database is never a good idea. There will be areas that 
do a select based upon the key and expect one and only one answer to come back.

Dave

On 10/22/15 10:47, Clodoaldo de Borba Lambiase wrote:
> Hi,
>
> I've tested the inclusion of the two different IPs with the same MAC address and It works fine like someone told here before. But, when I try do it by OMAPI protocol I receive the "key conflict" error message.
> It seems that DHCP restricts more by OMAPI than via dhcpd.conf.
>
> To solve this I *disabled* the "key conflict" test at the code. My php script already consists the IP/MAC before include by Omapi and I don't worry about incorrect inclusions.
>
> Unfortunately, I think that is not the best way to solve this.
> The best way would be apply the same DHCP behavior, during the reading of the dhcp.conf file, to the IP inclusion via OMAPI.
>
> PS: I need use the same MAC in different subnets because our clients connect notebooks and other devices in many places.
>
> Clodoaldo
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
>

-- 
Dave Calafrancesco


More information about the dhcp-users mailing list