Project

General

Profile

Bug #28122

Can't create a global parameter via hammer

Added by ina vasilevskaya about 2 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

While it's possible through webui, the straightforward global parameter creation with hammer results in 500 Server Error.

Seen on fresh deployment from 24\10\19 (3b202fa177a8db80decc7ea40745817ed1265ad8) where fix for https://projects.theforeman.org/issues/27740 is present. Can provide an env if necessary.

hammer global-parameter set --name aaa --value aaa

Results in

[32m2019-10-24T12:13:50ESC[0m [D|ESC[36mappESC[0m|cc128e9b] Backtrace for 'Action failed' error (ActiveModel::UnknownAttributeError): unknown attribute 'location_id' for CommonParameter.
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activemodel-5.2.1/lib/active_model/attribute_assignment.rb:53:in `_assign_attribute'
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activemodel-5.2.1/lib/active_model/attribute_assignment.rb:44:in `block in _assign_attributes'
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activemodel-5.2.1/lib/active_model/attribute_assignment.rb:43:in `each'
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activemodel-5.2.1/lib/active_model/attribute_assignment.rb:43:in `_assign_attributes'
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activerecord-5.2.1/lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activemodel-5.2.1/lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
 | /home/centos/.rvm/gems/ruby-2.6.3/gems/activerecord-5.2.1/lib/active_record/core.rb:314:in `initialize'


Related issues

Related to Foreman - Bug #27740: Cannot set parameter for hostgroupClosed

Associated revisions

Revision 5fb8dd2d (diff)
Added by Tomer Brisker about 1 month ago

Fixes #28122 - Allow creating common params with lone taxonomy

Global parameters are handled by the common_parameters controller, not
the parameters_controller.

History

#1 Updated by Tomer Brisker about 2 months ago

  • Is duplicate of Bug #27740: Cannot set parameter for hostgroup added

#2 Updated by Tomer Brisker about 2 months ago

  • Is duplicate of deleted (Bug #27740: Cannot set parameter for hostgroup)

#3 Updated by Tomer Brisker about 2 months ago

  • Related to Bug #27740: Cannot set parameter for hostgroup added

#4 Updated by Tomer Brisker about 2 months ago

  • Assignee set to Tomer Brisker
  • Category set to API
  • Project changed from Hammer CLI to Foreman

#5 Updated by The Foreman Bot about 2 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7125 added

#6 Updated by Tomer Brisker about 2 months ago

  • Target version set to 1.23.1

#7 Updated by The Foreman Bot about 1 month ago

  • Fixed in Releases 2.0.0 added

#8 Updated by Tomer Brisker about 1 month ago

  • Fixed in Releases 1.23.1, 1.24.0 added
  • Fixed in Releases deleted (2.0.0)

#9 Updated by Tomer Brisker about 1 month ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF