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 over 8 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 #1

Updated by Eric Helms over 8 years ago

  • Category set to Hosts
  • Translation missing: en.field_release set to 86
Actions #2

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release changed from 86 to 144
Actions #3

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release changed from 144 to 168
Actions #4

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release deleted (168)
Actions #5

Updated by Justin Sherrill about 8 years ago

  • Assignee set to Chris Duryee
  • Difficulty set to easy
Actions #6

Updated by Chris Duryee about 8 years ago

  • Status changed from New to Closed

I was not able to reproduce this on Katello 3.x. It looks like this was fixed in https://github.com/Katello/katello/pull/5940, which is in 3.0. That PR is a significant rewrite of this area, which appears to have fixed this bug.

Marking as closed.

Actions #7

Updated by Justin Sherrill about 8 years ago

  • Status changed from Closed to Rejected
  • Translation missing: en.field_release set to 166
Actions

Also available in: Atom PDF