On Thursday, December 8, 2016 at 3:46:08 PM UTC+1, Lukas Zapletal wrote:
>
> Hmmm we have a bit of code around leases - the IP address that was 
> assigned via lease, we should ignore it.
>
> Are you also changing the hostname? Can you try without changing the 
> hostname?
>
> Also increasing Rails app logging level to debug should show this:
>
>       logger.debug "Comparing #{attrs.values_at(*to_compare)} == 
> #{other.attrs.values_at(*to_compare)}"
>
> So we can see all the validations from there.
>
>
Hello Lukas,

I tried without changing the hostname, same thing. This is what I get on 
the foreman master with debug enabled:

2016-12-08T15:11:18 6c52e832 [app] [I]   Parameters: {"utf8"=>"✓", 
"authenticity_token"=>"5X6uGLWNqGzNLXJRkoz5I9HGRMvZ504n37l0XdxiBdQnaCOKdKdpsn0KoOIxK/wKuaAM5NL/2CL+0mWg56AWEw==",
 
"host"=>{"name"=>"mac080027977078", "hostgroup_id"=>"7", 
"ansible_role_ids"=>[""], "managed"=>"true", 
"progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", 
"interfaces_attributes"=>{"0"=>{"_destroy"=>"0", 
"mac"=>"08:00:27:97:70:78", "identifier"=>"enp0s3", 
"name"=>"mac080027977078", "domain_id"=>"1", "subnet_id"=>"8", 
"ip"=>"192.168.60.39", "ip6"=>"", "managed"=>"1", "primary"=>"1", 
"provision"=>"1", "tag"=>"", "attached_to"=>"", "id"=>"154"}}, 
"architecture_id"=>"1", "operatingsystem_id"=>"1", "build"=>"1", 
"medium_id"=>"7", "ptable_id"=>"82", "pxe_loader"=>"PXELinux BIOS", 
"disk"=>"", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"1", 
"comment"=>"", "overwrite"=>"false"}, 
"discovered_host"=>{"puppetclass_ids"=>[""]}, 
"bare_metal_capabilities"=>"build", "id"=>"mac080027977078"}
2016-12-08T15:11:18 6c52e832 [app] [D] Setting current user thread-local 
variable to admin
2016-12-08T15:11:18 6c52e832 [app] [D] Setting current organization 
thread-local variable to none
2016-12-08T15:11:18 6c52e832 [app] [D] Setting current location 
thread-local variable to none
2016-12-08T15:11:18 6c52e832 [app] [D] Comparing ["08:00:27:97:70:78", 
"192.168.60.112", "192.168.60.0"] == ["08:00:27:97:70:78", "192.168.60.39", 
"192.168.60.0"]
2016-12-08T15:11:19 6c52e832 [app] [D] Comparing ["08:00:27:97:70:78", 
"192.168.60.112", "192.168.60.0"] == ["08:00:27:97:70:78", "192.168.60.39", 
"192.168.60.0"]
2016-12-08T15:11:19 6c52e832 [app] [I] Failed to save: Conflict DHCP 
records -08:00:27:97:70:78/192.168.60.112 already exists, Conflict DHCP 
records -08:00:27:97:70:78/192.168.60.112 already exists
2016-12-08T15:11:19 6c52e832 [app] [I]   Rendered hosts/_conflicts.html.erb 
(0.7ms)
2016-12-08T15:11:19 6c52e832 [app] [I]   Rendered hosts/_progress.html.erb 
(0.7ms)
2016-12-08T15:11:19 6c52e832 [app] [D] Setting current organization 
thread-local variable to none
2016-12-08T15:11:19 6c52e832 [app] [D] Setting current location 
thread-local variable to none
2016-12-08T15:11:19 6c52e832 [app] [I]   Rendered nic/_base_form.html.erb 
(22.8ms)


The dhcp server is configured as following:

subnet 192.168.60.0 netmask 255.255.255.0 {
  pool
  {
    range 192.168.60.110 192.168.60.150;
  }

  option subnet-mask 255.255.255.0;
  option routers 192.168.60.4;
}

The subnet is currently configured with IPAM = none

-- 
> Later,
>   Lukas @lzap Zapletal
>

Thanks! 

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to