A MAC address can only exist once, if you already have a
(managed/unmanaged) host and you try to discover a host with same MAC,
you will get error. Depending on Foreman discovery it is either 422 or
"Host already exists":
https://github.com/theforeman/foreman_discovery/commit/210f143bc85c58caeb67e8bf9a5cc2edbe764683

Anyway you wrote you have deadlocks, but in the log snippet I do see
that you have host discovery at rate 1-2 imports per minute. This
cannot block anything, this is quite slow rate. I don't understand,
can you pastebin log snippet from the peak time when you have these
deadlocks?



On Tue, Sep 19, 2017 at 10:03 PM, 'Konstantin Orekhov' via Foreman
users <[email protected]> wrote:
> After I got the debug output, I've deleted this host from Foreman and on its
> next attempt it got registered perfectly fine - no issues with interfaces or
> anything anymore:
>
> (on a client side)
>
> Discovered by URL: https://spc.vip
> Registering host with Foreman (https://spc.vip)
> Response from Foreman 201: {"id":447371,"name":"mac3cfdfe52252c" <snip>
>
> (on Foreman side):
> 2017-09-19 12:39:34 7ca37aca [app] [I] Started DELETE
> "/discovered_hosts/mac3cfdfe52252c" for 10.102.141.20 at 2017-09-19 12:39:34
> -0700
> 2017-09-19 12:39:34 7ca37aca [app] [I]   Parameters:
> {"authenticity_token"=>"<removed>", "id"=>"mac3cfdfe52252c"}
>
> 2017-09-19 12:40:04 1a346c39 [app] [I] Started POST
> "/api/v2/discovered_hosts/facts" for 10.102.141.20 at 2017-09-19 12:40:04
> -0700
> 2017-09-19 12:40:04 1a346c39 [app] [I] Processing by
> Api::V2::DiscoveredHostsController#facts as JSON
> 2017-09-19 12:40:04 1a346c39 [app] [I]   Parameters: {"facts"=>"[FILTERED]",
> "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}}
> 2017-09-19 12:40:06 1a346c39 [audit] [I] [mac3cfdfe52252c] deleted 0
> (1694.6ms)
> 2017-09-19 12:40:06 1a346c39 [audit] [I] [mac3cfdfe52252c] updated 0 (2.6ms)
> 2017-09-19 12:40:07 1a346c39 [audit] [I] [mac3cfdfe52252c] added 385
> (1637.5ms)
> 2017-09-19 12:40:07 1a346c39 [app] [I] Import facts for 'mac3cfdfe52252c'
> completed. Added: 385, Updated: 0, Deleted 0 facts
>
> It would be nice to figure out what's causing this in a first place - I do
> see a lot of those "Unprocessable Entity" messages logged.
> 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.



-- 
Later,
  Lukas @lzap Zapletal

-- 
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