Nobody else sees this issue? Lukas #lzap Zapletal, do you have any thoughts on this? I do have a bunch issues with discovered hosts at the moment and I think it is related - I have many duplicate hosts discovered - the same MAC name, but no other data/facts, anything:
<https://lh3.googleusercontent.com/-tkrJttYlYx8/WLSgLfXnpLI/AAAAAAAAAC0/zNSiP4zygro7WPy1iBV5Uw5y0awGH7G5QCLcB/s1600/Screen%2BShot%2B2017-02-27%2Bat%2B1.54.19%2BPM.png> As you can see, there's 1 more or less "normal" entry and bunch of duplicate ones. If I expand a "normal" one, all the facts are actually there and correct, however, for some reason not all of them are shown in a dashboard page - some facts are shown as "N/A" (like model/productname), the others are just empty (like an IP), but those facts although they are certainly reported and known: <https://lh3.googleusercontent.com/-vvrAyWDoa6w/WLShkPoeh1I/AAAAAAAAADA/vAnUK6Sh28w3R7BgHcdzivWhw5do5WqCACLcB/s1600/Screen%2BShot%2B2017-02-27%2Bat%2B1.58.51%2BPM.png> Going back to a lot duplicate hosts. My production.log is full of these entries: 2017-02-27 15:21:56 5b38d3e9 [app] [I] Started POST "/api/v2/discovered_hosts/facts" for 10.170.19.170 at 2017-02-27 15:21:56 -0700 2017-02-27 15:21:56 5b38d3e9 [app] [I] Processing by Api::V2::DiscoveredHostsController#facts as JSON 2017-02-27 15:21:56 5b38d3e9 [app] [I] Parameters: {"facts"=>"[FILTERED]", "apiv"=>"v2", "discovered_host"=>{"facts"=>"[FILTERED]"}} 2017-02-27 15:21:57 5b38d3e9 [audit] [I] [mac7cd30abf30ac] deleted 0 (367.8ms) 2017-02-27 15:21:57 5b38d3e9 [audit] [I] [mac7cd30abf30ac] updated 0 (374.3ms) 2017-02-27 15:21:57 5b38d3e9 [audit] [I] [mac7cd30abf30ac] added 0 (3.2ms) 2017-02-27 15:21:57 5b38d3e9 [app] [I] Import facts for 'mac7cd30abf30ac' completed. Added: 0, Updated: 0, Deleted 0 facts 2017-02-27 15:21:57 5b38d3e9 [app] [W] Subnet could not be detected for 10.170.19.170 2017-02-27 15:21:57 5b38d3e9 [app] [W] Host discovery failed, facts: { <snip all host facts> } 2017-02-27 15:21:57 5b38d3e9 [app] [I] Completed 422 Unprocessable Entity in 974ms (Views: 0.4ms | ActiveRecord: 466.3ms) On a host side the above results in these entries: Fact cache invalid, reloading to foreman Parsing kernel line: <snip> Discovered by URL: https://foreman.domain.com Registering host with Foreman (https://foreman.domain.com) Response from Foreman 422: {"message":"Validation failed: Name has already been taken"} And this keeps going on every 30 seconds. I don't see the number of duplicate invalid hosts increasing on such attempts, yet I can't figure out why and how they were created in a first place. When delete such invalid duplicate hosts while keeping "semi-good" one and restart discovery on a host side, things get back to normal. Even dashboard view starts showing model now, but still no IP: <https://lh3.googleusercontent.com/-XOIRJQ_XODQ/WLSthYiLTTI/AAAAAAAAADU/UuanXjdNLHsAO2nhoF2c3lWgmZv5Pij6ACLcB/s1600/Screen%2BShot%2B2017-02-27%2Bat%2B2.51.29%2BPM.png> At first I thought this situation with duplicate hosts is somehow related to older discovery agent running on my hosts (foreman-proxy version 1.10.4, discovery GEM version 3.0.5 that runs on in-memory Ubuntu 14.04, our own version of FDI discussed here - https://groups.google.com/d/topic/foreman-users/G-hvzJm3nVM/discussion) and that's why I tried latest FDI 3.3.1 image but ran into issue with facts refresh (my original post). Now, since I'm able to make things work after duplicates deletion, I don't think this is an agent problem, but something on discovery plugin side. I'd much appreciate your help here to figure out what's happening. I have not seen such issues on 1.12 or earlier and did not run on 1.13 for enough time to notice this either. -- 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.
