Project

General

Profile

Bug #12799

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

Added by Tomer Brisker over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - libvirt
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
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

Related to Foreman - Bug #7568: Use attr_accessible for rails 4 upgradeClosed2014-09-22

Associated revisions

Revision 48526224 (diff)
Added by Tomer Brisker over 3 years ago

Fixes #12799 - Add uuid to Compute Resource attr_accessible

History

#1 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 71

#2 Updated by Tomer Brisker over 3 years ago

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

#3 Updated by The Foreman Bot over 3 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

#4 Updated by Anonymous over 3 years ago

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

Also available in: Atom PDF