Project

General

Profile

Actions

Bug #11767

closed

Templates are not being resolved in the host form

Added by Tomáš Strachota over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Host creation
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Even though the templates are set correctly, when hitting "Resolve" the response is always "Sorry but no templates were configured". Provisioning itself is not affected and works as expected though.

Further investigation showed the problem is in mass assignment that happens in the background call triggered by the button:

 | ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: 0, new_interfaces):
 |   app/models/concerns/foreman/sti.rb:22:in `new'
 |   app/models/concerns/foreman/sti.rb:22:in `new_with_cast'
 |   app/models/host/base.rb:75:in `initialize'
 |   app/models/host/managed.rb:49:in `initialize'
 |   app/models/concerns/foreman/sti.rb:22:in `new'
 |   app/models/concerns/foreman/sti.rb:22:in `new_with_cast'
 |   app/models/host.rb:15:in `method_missing'
 |   app/controllers/hosts_controller.rb:549:in `template_used'
 |   app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'

It was introduced by fix for http://projects.theforeman.org/issues/9058


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #11768: Switching organization or location fails with mass assignment security errorResolved09/10/2015Actions
Related to Foreman - Bug #9058: Changing organization/location when creating new host resets interfaces setupClosedTom Caspy01/21/2015Actions
Related to Foreman - Bug #8405: Resolve Templates button on Host#edit broken for multi-nic systemsClosedGreg Sutcliffe11/14/2014Actions
Actions #1

Updated by Tomáš Strachota over 8 years ago

  • Related to Bug #11768: Switching organization or location fails with mass assignment security error added
Actions #2

Updated by Tomáš Strachota over 8 years ago

  • Related to Bug #9058: Changing organization/location when creating new host resets interfaces setup added
Actions #3

Updated by Dominic Cleal over 8 years ago

  • Category changed from Web Interface to Host creation
  • translation missing: en.field_release set to 63
Actions #4

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2711 added
  • Pull request deleted ()
Actions #5

Updated by Marek Hulán over 8 years ago

  • Related to Bug #8405: Resolve Templates button on Host#edit broken for multi-nic systems added
Actions #6

Updated by Dominic Cleal over 8 years ago

  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/2713 added
  • Pull request deleted (https://github.com/theforeman/foreman/pull/2711)
Actions #7

Updated by Marek Hulán over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF