Red Hat Bugzilla – Bug 1313659
NoMethodError: undefined method `new' for Katello::Host:Module on associating content-source while creating new host
Last modified: 2018-08-31 11:19 EDT
Created attachment 1132158 [details] Completed 500 Internal Server Error on associating content-source while creating new host Description of problem: I was trying to create a new and as soon as I associate the content-source, production.log filled with following traceback: ----- 2016-03-02 08:04:06 [app] [I] Started GET "/operatingsystems/1/available_kickstart_repo?lifecycle_environment_id=5&content_source_id=1&architecture_id=1&operatingsystem_id=1&content_view_id=5" for 10.65.193.200 at 2016-03-02 08:04:06 +0100 2016-03-02 08:04:06 [app] [I] Processing by OperatingsystemsController#available_kickstart_repo as */* 2016-03-02 08:04:06 [app] [I] Parameters: {"lifecycle_environment_id"=>"5", "content_source_id"=>"1", "architecture_id"=>"1", "operatingsystem_id"=>"1", "content_view_id"=>"5", "id"=>"1"} 2016-03-02 08:04:06 [app] [W] Action failed | NoMethodError: undefined method `new' for Katello::Host:Module | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.1/app/controllers/katello/concerns/operatingsystems_controller_extensions.rb:7:in `available_kickstart_repo' | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/implicit_render.rb:4:in `send_action' | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:189:in `process_action' | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rendering.rb:10:in `process_action' | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:20:in `block in process_action' Version-Release number of selected component (if applicable): Satellite 6.2 snap1 How reproducible: always Steps to Reproduce: 1. Create a new host 2. associating content-source and open firebug 3. Check production.log Actual results: | NoMethodError: undefined method `new' for Katello::Host:Module Firebug raises: GET https://ibm-x3550m3-06.lab.eng.brq.redhat.com/operatingsystems/1/available_…ntent_source_id=1&architecture_id=1&operatingsystem_id=1&content_view_id=5 500 (Internal Server Error) Expected results: No error should be thrown on content-source association Additional info:
Connecting redmine issue http://projects.theforeman.org/issues/13954 from this bug
Verified with sat6.2 beta snap5.1 The reported issue has been fixed and I don't see exception mentioned in bz description on associating content-source with new host. 2016-03-28 05:24:16 [app] [I] Started GET "/operatingsystems/1/available_kickstart_repo?lifecycle_environment_id=2&content_source_id=1&architecture_id=1&operatingsystem_id=1&content_view_id=2" for 10.65.193.200 at 2016-03-28 05:24:16 -0400 2016-03-28 05:24:16 [app] [I] Processing by OperatingsystemsController#available_kickstart_repo as */* 2016-03-28 05:24:16 [app] [I] Parameters: {"lifecycle_environment_id"=>"2", "content_source_id"=>"1", "architecture_id"=>"1", "operatingsystem_id"=>"1", "content_view_id"=>"2", "id"=>"1"} 2016-03-28 05:24:16 [app] [I] Completed 200 OK in 20ms (Views: 0.2ms | ActiveRecord: 3.6ms)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1500