Project

General

Profile

Actions

Bug #13351

closed

Associating a content-source while creating hostgroup raises: NoMethodError: undefined method `new' for Katello::Host:Module

Added by Sachin Ghai about 9 years ago. Updated over 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
Category:
Hosts
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

On associating content-source from webUI, while creating a hostgroup raises following error in production.log. However no error on webUI, but UI doesn't retain the association with content-source after submitting the hostgroup form,

2016-01-25 04:59:06 [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.10.49.25 at 2016-01-25 04:59:06 -0500
2016-01-25 04:59:06 [app] [I] Processing by OperatingsystemsController#available_kickstart_repo as */*
2016-01-25 04:59:06 [app] [I]   Parameters: {"lifecycle_environment_id"=>"2", "content_source_id"=>"1", "architecture_id"=>"1", "operatingsystem_id"=>"1", "content_view_id"=>"2", "id"=>"1"}
2016-01-25 04:59:06 [app] [W] Action failed
 | NoMethodError: undefined method `new' for Katello::Host:Module
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-2.5.0/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'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:113:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'

Reproducible with: ===================
pulp-katello-0.4-3.el7.noarch
foreman-1.11.0-0.develop.201601211808gitd546fd0.el7.noarch
katello-installer-2.5.0-1.nightly.201601221923git2b6c177.el7.noarch
katello-2.5.0-3.nightly.el7.noarch
katello-repos-2.4.0-2.nightly.el7.noarch

Steps:
-----
- Create a hostgroup
- associate all fields and content-source
- check production.log

Actions

Also available in: Atom PDF