Project

General

Profile

Bug #14344

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

Added by Dominic Cleal over 3 years ago. Updated over 1 year ago.

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

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

Associated revisions

Revision ecd29f60 (diff)
Added by Dominic Cleal over 3 years ago

fixes #14344 - add region to permitted Rackspace CR attributes

Revision c590d51a (diff)
Added by Dominic Cleal over 3 years ago

fixes #14344 - add region to permitted Rackspace CR attributes

(cherry picked from commit ecd29f60da9a45409e26b580e54725b4198bfc5c)

History

#1 Updated by Dominic Cleal over 3 years ago

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

#2 Updated by The Foreman Bot over 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Pull request https://github.com/theforeman/foreman/pull/3367 added

#3 Updated by Dominic Cleal over 3 years ago

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

Also available in: Atom PDF