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 almost 6 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

Also available in: Atom PDF