Bug #19212
openUnable refresh facts on newly-registered systems within first 3-5 minutes
Description
As reported in https://groups.google.com/forum/#!topic/foreman-users/XzT9iEhpjRg, facts_refresh in UI on newly-discovered hosts is failing during first 3-5 minutes of discovery with this message:
Error: ERF50-7522 [Foreman::WrappedException]: Failed to refresh facts for mac38eaa7314178 with error Could not get facts from proxy https://10.98.59.254:8443: undefined local variable or method `reports' for #<Host::Discovered:0x000000072807b0> ([RuntimeError]: Could not get facts from proxy https://10.98.59.254:8443: undefined local variable or m...)
On the host side the following is logged by Foreman discovery process:
Registering host with Foreman (https://spc.vip)
Response from Foreman 422: {"message":"undefined local variable or method `reports' for #\u003cHost::Discovered:0x007ff6d7093000\u003e"}
After that initial period is over and system is successfully registered, the facts refresh work fine. It is unclear to me what prevents a system to register within those 3-5 minutes as no changes are being made and all of the sudden the registration process completes.
There are more details in https://groups.google.com/forum/#!topic/foreman-users/XzT9iEhpjRg
I also strongly believe that this issue either an result or a cause of duplicate discovered host entries (with empty values). This also described in above post.