Bug 1313659 - NoMethodError: undefined method `new' for Katello::Host:Module on associating content-source while creating new host
Summary: NoMethodError: undefined method `new' for Katello::Host:Module on associating...
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Depends On:
TreeView+ depends on / blocked
Reported: 2016-03-02 07:12 UTC by Sachin Ghai
Modified: 2019-09-26 17:36 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 09:03:32 UTC
Target Upstream Version:

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 07:12 UTC, Sachin Ghai
no flags Details

System ID Priority Status Summary Last Updated
Foreman Issue Tracker 13954 None None None 2016-04-22 16:34:53 UTC
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Sachin Ghai 2016-03-02 07:12:48 UTC
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 19:38:33 UTC
Connecting redmine issue http://projects.theforeman.org/issues/13954 from this bug

Comment 3 Sachin Ghai 2016-03-28 09:26:27 UTC
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 09:03:32 UTC
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.