Bug 1313659 - NoMethodError: undefined method `new' for Katello::Host:Module on associating content-source while creating new host
NoMethodError: undefined method `new' for Katello::Host:Module on associating...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts (Show other bugs)
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: 6.2
Assigned To: Justin Sherrill
Sachin Ghai
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2016-03-02 02:12 EST by Sachin Ghai
Modified: 2016-07-27 05:03 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-27 05:03:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Completed 500 Internal Server Error on associating content-source while creating new host (82.89 KB, image/png)
2016-03-02 02:12 EST, Sachin Ghai
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 13954 None None None 2016-04-22 12:34 EDT

  None (edit)
Description Sachin Ghai 2016-03-02 02:12:48 EST
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 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- `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:

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:
Comment 2 Justin Sherrill 2016-03-14 15:38:33 EDT
Connecting redmine issue http://projects.theforeman.org/issues/13954 from this bug
Comment 3 Sachin Ghai 2016-03-28 05:26:27 EDT
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 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)
Comment 6 errata-xmlrpc 2016-07-27 05:03:32 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.