Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1313659

Summary: NoMethodError: undefined method `new' for Katello::Host:Module on associating content-source while creating new host
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: HostsAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Sachin Ghai <sghai>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/13954
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:03:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Completed 500 Internal Server Error on associating content-source while creating new host none

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 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:

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 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)

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.

https://access.redhat.com/errata/RHBA-2016:1500