Project

General

Profile

Actions

Bug #12799

closed

Creating new compute resource fails with "Can't mass-assign protected attributes: uuid"

Added by Tomer Brisker over 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - libvirt
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Create a new libvirt resource -> save -> get stack trace:

ActiveModel::MassAssignmentSecurity::Error in ComputeResourcesController#create

Can't mass-assign protected attributes: uuid
Rails.root: /home/tbrisker/foreman

Application Trace | Framework Trace | Full Trace
app/models/compute_resource.rb:73:in `new'
app/models/compute_resource.rb:73:in `block in new_provider'
app/models/compute_resource.rb:72:in `each'
app/models/compute_resource.rb:72:in `new_provider'
app/controllers/compute_resources_controller.rb:26:in `create'
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'
Request

Parameters:

{"utf8"=>"✓",
 "authenticity_token"=>"vCzf6Yl1G6hDMqg4tOUU83IFZpf4WItyPaqRqq8V31I=",
 "compute_resource"=>{"name"=>"local",
 "description"=>"",
 "url"=>"qemu:///system",
 "display_type"=>"VNC",
 "set_console_password"=>"[FILTERED]",
 "uuid"=>"5ED58601-545B-11CB-83D8-BE9FEEB2C1AB",
 "location_ids"=>[""],
 "organization_ids"=>[""]},
 "commit"=>"Submit",
 "locale"=>nil}

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #7568: Use attr_accessible for rails 4 upgradeClosedDaniel Lobato Garcia09/22/2014Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

  • translation missing: en.field_release set to 71
Actions #2

Updated by Tomer Brisker over 8 years ago

  • Related to Bug #7568: Use attr_accessible for rails 4 upgrade added
Actions #3

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/2973 added
Actions #4

Updated by Anonymous over 8 years ago

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

Also available in: Atom PDF