Project

General

Profile

Actions

Bug #14344

closed

Rackspace CR can't be created, region is protected attribute

Added by Dominic Cleal over 8 years ago. Updated over 6 years ago.

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

Description

When creating (or testing connection) for a Rackspace compute resource, the following error is thrown:

2016-03-24T12:11:44 [app] [I] Started PUT "/compute_resources/test_connection" for 127.0.0.1 at 2016-03-24 12:11:44 +0000
2016-03-24T12:11:44 [app] [I] Processing by ComputeResourcesController#test_connection as */*
2016-03-24T12:11:44 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"..", "compute_resource"=>{"name"=>"", "provider"=>"Rackspace", "description"=>"", "url"=>"", "user"=>"", "password"=>"[FILTERED]", "region"=>"IAD"}, "fakepassword"=>"[FILTERED]", "cr_id"=>"null"}
2016-03-24T12:11:44 [sql] [D]   User Load (0.1ms)  SELECT  "users".* FROM "users"  WHERE "users"."id" = ? LIMIT 1  [["id", 24]]
2016-03-24T12:11:44 [app] [D] Setting current user thread-local variable to admin
2016-03-24T12:11:44 [sql] [D]   AuthSource Load (0.1ms)  SELECT  "auth_sources".* FROM "auth_sources"  WHERE "auth_sources"."id" = ? LIMIT 1  [["id", 1]]
2016-03-24T12:11:44 [app] [I] CR_ID IS null
2016-03-24T12:11:44 [app] [I] Completed 500 Internal Server Error in 7ms (ActiveRecord: 0.2ms)
2016-03-24T12:11:44 [app] [F] 
 | ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes for Foreman::Model::Rackspace: region):
 |   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:94:in `test_connection'
 |   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'

Related issues 1 (0 open1 closed)

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

Also available in: Atom PDF