OMAPI "key conflict"

Bruce Hudson Bruce.Hudson at
Mon Sep 10 19:44:02 UTC 2007

> Phil Mayers wrote:
> >I am trying to create the following two hosts via OMAPI:
> >
> >host {
> >  hardware ethernet 00:11:22:33:44:55;
> >  fixed-address;
> >};
> >host {
> >  hardware ethernet 00:11:22:33:44:55;
> >  fixed-address;
> >};
> >
> >I am unable to create the 2nd; I get an OMAPI "key conflict". I 
> >presume this is because the MAC address is already in there;
> Wrong, it's because the hostname is already there. The name part (ie 
> the word between "host" and "{") is a unique key in the database and 
> cannot be duplicated.

    That may be the only cause of a key conflict when hosts are created
via the config file but, for what-ever reason, OMAPI has always been
stricter. It will fail to create host entries with duplicate hardware
addresses and returns a 44 (Key Conflict) status.

    As pointed out earlier, you need to create a single host entry with
both IP addresses to do what you want. That may cause a problem if your
code uses the address as an index into the entry names to find existing
Bruce A. Hudson				| Bruce.Hudson at Dal.CA
UCIS, Networks and Systems		|
Dalhousie University			|
Halifax, Nova Scotia, Canada		| (902) 494-3405

More information about the dhcp-users mailing list