···
On Fri, May 19, 2017 at 8:47 PM, Konstantin Orekhov wrote:
>
>> unless new_host && hostgroup.nil? && respond_to?(:reports) &&
>> reports.empty?
>>
>
> Well, that's what I was trying to tell you - this patch did not work for me.
> I tried it out as you suggested on May 3rd, the only difference it made is
> the error message changed from
>
> Discovered by URL: https://foreman.domain.com
> Registering host with Foreman (https://foreman.domain.com)
> Response from Foreman 422: {"message":"undefined local variable or method
> `reports' for #\u003cHost::Discovered:0x007f0a485be538\}
>
> to
>
> Discovered by URL: https://spc.vip
> Registering host with Foreman (https://spc.vip)
> Response from Foreman 422: {"message":"undefined method `respond_to' for
> #\u003cHost::Discovered:0x007f102410e8a8\u003e"}
>
> So, only a complete removal of that RPM helped me so far.
>
You forgot the question mark, did you? Or maybe I did in the previous
> mail, anyway its really this:
>
> respond_to?(:reports)
>
>
I don't think so, but I just repeated the patching just in case:
However, instead of a httpd reload, I did a full restart this time around
and it made all the difference and now I see new clients registering on a
first try. Previously discovered hosts, if rebooted into discovery OS, get
the following responses from Foreman:
Discovered by URL: spc.vip
Registering host with Foreman (spc.vip)
Could not send facts to Foreman: undefined method `+’ for nil:NilClass
Fact cache invalid, reloading to foreman
This error, unlike before patching one, does not prevent facts refresh from Foreman though, but also this error does not seem to go away - waited for more than 15 minutes so far and it is still there on every attempt client makes to send a register payload. If you have any suggestions to try for the above, I’ll try it out.
I’ll do more watching on this front and report issues if found.
I am sorry I cannot reproduce on my environment. Greg, any idea what is wrong?
What is the backtrace now for the undefined method `+' for nil:NilClass error?
LZ
···
On Mon, May 22, 2017 at 10:09 PM, Konstantin Orekhov wrote:
>
>
>> You forgot the question mark, did you? Or maybe I did in the previous
>> mail, anyway its really this:
>>
>> respond_to?(:reports)
>>
>
> I don't think so, but I just repeated the patching just in case:
>
> # diff
> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_default_hostgroup-4.0.0/lib/default_hostgroup_base_host_patch.rb
> /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_default_hostgroup-4.0.0/lib/default_hostgroup_base_host_patch.rb-orig
> 66c66
> < unless new_host && hostgroup.nil? && respond_to?(:reports) &&
> reports.empty?
> ---
>> unless new_host && hostgroup.nil? && reports.empty?
>
> However, instead of a httpd reload, I did a full restart this time around
> and it made all the difference and now I see new clients registering on a
> first try. Previously discovered hosts, if rebooted into discovery OS, get
> the following responses from Foreman:
>
>
>
> Discovered by URL: spc.vip
> Registering host with Foreman (spc.vip)
> Could not send facts to Foreman: undefined method `+' for nil:NilClass
> Fact cache invalid, reloading to foreman
>
>
> This error, unlike before patching one, does not prevent facts refresh from
> Foreman though, but also this error does not seem to go away - waited for
> more than 15 minutes so far and it is still there on every attempt client
> makes to send a register payload. If you have any suggestions to try for the
> above, I'll try it out.
>
> I'll do more watching on this front and report issues if found.
>
>
> Thanks!