Hi, guys! Didn't get a chance to look into this until to today, but here are 
the results.
Tried dirty patching first - did not help as after patching the message on a 
client side changed to this:
<snip>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"}<snip>
The behavior did not change.
Disabling hostgroup plugin by renaming its config file 
/etc/foreman/plugins/foreman_default_hostgroup.yaml did not help either.
Only after I removed a whole 
tfm-rubygem-foreman_default_hostgroup-4.0.0-1.fm1_13.el7.noarch package, the 
client was able to register in Foreman on a first attempt:
<snip>Discovered by URL: https://spc.vip
Registering host with Foreman (https://spc.vip)
Response from Foreman 201: {<snip>

This is a good workaround, but I do like an ability to force a system w/o any 
HG to be assigned into a default HG, which does some common things applicable 
to all systems for us.
So, my next question is how this can actually be fixed - I'd happy to try some 
other patches, etc to help out on this as much as possible. I'm currently 
running on 1.14.3.
Thanks!
Konstantin Orekhov

     
Hey, Greg is at Red Hat Summit this week, in the meantime uninstall
the foreman_default_hostgroup or disable it or something. Or apply a
dirty patch on the line 66:

unless new_host && hostgroup.nil? && reports.empty?

change to

unless new_host && hostgroup.nil? && !respond_to(:reports) && reports.empty?

On Wed, May 3, 2017 at 3:44 AM, Konstantin Orekhov <korek...@yahoo.com> wrote:
>
>>
>> It's a bug in
>> https://github.com/theforeman/foreman_default_hostgroup/blob/develop/lib/default_hostgroup_base_host_patch.rb#L66
>> where it expects "reports" to be present
>>
>> 2017-04-17 11:48:26 e3962d8a [app] [D] undefined local variable or method
>> `reports' for #<Host::Discovered:0x0000000c8dc078>

   

-- 
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 foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
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