ISC dhcp - IP already taken

I'm noticing that foreman-proxy is able to find a free IP address in
our DHCP subnet, however when submitting the host form, foreman
indicates that the IP address it found is not available for use. In
addition, the host form also errors and returns a message indicating
that the MAC address has already been taken. I have verified that the
IP/MAC are not used by any other host that is managed by foreman.

Some log information (proxy.log)

D, [2012-01-05T10:25:35.810136 #10165] DEBUG – : Searching for free
ip - pinging 10.133.7.3
D, [2012-01-05T10:25:37.842323 #10165] DEBUG – : Found free ip
10.133.7.3 out of a total of 253 free ips

So, foreman suggests that 10.133.7.3, but when the form fails to
submit with "this IP has already been taken". I'm using ISC dhcpd
server currently there aren't any entries in the dhcpd database files
(/var/lib/dhcpd/dhcpd.leases). Anyways, I'm a bit confused on this
one.

Foreman production log (host entry submit):

Parameters: {"commit"=>"Submit", "action"=>"create",
"authenticity_token"=>"7+aaBy5PN6KL0ATo7xokYSXqCqVH+1DVWeJgnInPCpI=",
"controller"=>"hosts", "host"=>{"comment"=>"", "architectu
re_id"=>"1", "subnet_id"=>"3", "managed"=>"true",
"puppetproxy_id"=>"3", "name"=>"csgsandbox",
"host_parameters_attributes"=>{"0"=>{"name"=>"", "nested"=>"",
"value"=>"", "_destroy"=>
""}}, "sp_mac"=>"", "puppetmaster_name"=>"puppet", "sp_name"=>"",
"mac"=>"00:18:8B:41:CE:D0", "domain_id"=>"2", "enabled"=>"1",
"root_pass"=>"[FILTERED]", "build"=>"
1", "medium_id"=>"5", "hostgroup_id"=>"7", "ptable_id"=>"1",
"ip"=>"10.133.7.3", "environment_id"=>"1", "model_id"=>"", "disk"=>"",
"sp_ip"=>"", "puppetclass_ids"=>[""], "operatingsys
tem_id"=>"16"}}
Failed to save: Ip has already been taken, Mac has already been taken

> I'm noticing that foreman-proxy is able to find a free IP address in
> our DHCP subnet, however when submitting the host form, foreman
> indicates that the IP address it found is not available for use. In
> addition, the host form also errors and returns a message indicating
> that the MAC address has already been taken. I have verified that the
> IP/MAC are not used by any other host that is managed by foreman.
>
> Some log information (proxy.log)
>
> D, [2012-01-05T10:25:35.810136 #10165] DEBUG – : Searching for free
> ip - pinging 10.133.7.3
> D, [2012-01-05T10:25:37.842323 #10165] DEBUG – : Found free ip
> 10.133.7.3 out of a total of 253 free ips
>
> So, foreman suggests that 10.133.7.3, but when the form fails to
> submit with "this IP has already been taken". I'm using ISC dhcpd
> server currently there aren't any entries in the dhcpd database files
> (/var/lib/dhcpd/dhcpd.leases). Anyways, I'm a bit confused on this
> one.
>
> Foreman production log (host entry submit):
>
> Parameters: {"commit"=>"Submit", "action"=>"create",
> "authenticity_token"=>"7+aaBy5PN6KL0ATo7xokYSXqCqVH+1DVWeJgnInPCpI=",
> "controller"=>"hosts", "host"=>{"comment"=>"", "architectu
> re_id"=>"1", "subnet_id"=>"3", "managed"=>"true",
> "puppetproxy_id"=>"3", "name"=>"csgsandbox",
> "host_parameters_attributes"=>{"0"=>{"name"=>"", "nested"=>"",
> "value"=>"", "_destroy"=>
> ""}}, "sp_mac"=>"", "puppetmaster_name"=>"puppet", "sp_name"=>"",
> "mac"=>"00:18:8B:41:CE:D0", "domain_id"=>"2", "enabled"=>"1",
> "root_pass"=>"[FILTERED]", "build"=>"
> 1", "medium_id"=>"5", "hostgroup_id"=>"7", "ptable_id"=>"1",
> "ip"=>"10.133.7.3", "environment_id"=>"1", "model_id"=>"", "disk"=>"",
> "sp_ip"=>"", "puppetclass_ids"=>[""], "operatingsys
> tem_id"=>"16"}}
> Failed to save: Ip has already been taken, Mac has already been taken
>

That error message comes from foreman itself when it search though the
database, I think you might have a host with that ip/mac already…

Ohad

··· On Thu, Jan 5, 2012 at 6:37 PM, Luke Baker wrote:


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Ugh… more coffee is required. There was a 'crusty' host with that IP
somehow - thanks again.

··· On Jan 5, 1:32 pm, Ohad Levy wrote: > On Thu, Jan 5, 2012 at 6:37 PM, Luke Baker wrote: > > I'm noticing that foreman-proxy is able to find a free IP address in > > our DHCP subnet, however when submitting the host form, foreman > > indicates that the IP address it found is not available for use. In > > addition, the host form also errors and returns a message indicating > > that the MAC address has already been taken. I have verified that the > > IP/MAC are not used by any other host that is managed by foreman. > > > Some log information (proxy.log) > > > D, [2012-01-05T10:25:35.810136 #10165] DEBUG -- : Searching for free > > ip - pinging 10.133.7.3 > > D, [2012-01-05T10:25:37.842323 #10165] DEBUG -- : Found free ip > > 10.133.7.3 out of a total of 253 free ips > > > So, foreman suggests that 10.133.7.3, but when the form fails to > > submit with "this IP has already been taken". I'm using ISC dhcpd > > server currently there aren't any entries in the dhcpd database files > > (/var/lib/dhcpd/dhcpd.leases). Anyways, I'm a bit confused on this > > one. > > > Foreman production log (host entry submit): > > > Parameters: {"commit"=>"Submit", "action"=>"create", > > "authenticity_token"=>"7+aaBy5PN6KL0ATo7xokYSXqCqVH+1DVWeJgnInPCpI=", > > "controller"=>"hosts", "host"=>{"comment"=>"", "architectu > > re_id"=>"1", "subnet_id"=>"3", "managed"=>"true", > > "puppetproxy_id"=>"3", "name"=>"csgsandbox", > > "host_parameters_attributes"=>{"0"=>{"name"=>"", "nested"=>"", > > "value"=>"", "_destroy"=> > > ""}}, "sp_mac"=>"", "puppetmaster_name"=>"puppet", "sp_name"=>"", > > "mac"=>"00:18:8B:41:CE:D0", "domain_id"=>"2", "enabled"=>"1", > > "root_pass"=>"[FILTERED]", "build"=>" > > 1", "medium_id"=>"5", "hostgroup_id"=>"7", "ptable_id"=>"1", > > "ip"=>"10.133.7.3", "environment_id"=>"1", "model_id"=>"", "disk"=>"", > > "sp_ip"=>"", "puppetclass_ids"=>[""], "operatingsys > > tem_id"=>"16"}} > > Failed to save: Ip has already been taken, Mac has already been taken > > That error message comes from foreman itself when it search though the > database, I think you might have a host with that ip/mac already.... > > Ohad > > > > > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to > > foreman-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/foreman-users?hl=en.