Bug #2381
closedcant set a parameter as overriden
Description
when checking a parameter to override in a parameterized class definition, i get
PG::Error: ERROR: null value in column "updated_at" violates not-null constraint : UPDATE "lookup_keys" SET "default_value" = '--- /etc/prout2', "description" = '', "validator_type" = '', "updated_at" = NULL WHERE "lookup_keys"."id" = 1
full trace is
ActiveRecord::StatementInvalid
PG::Error: ERROR: null value in column "updated_at" violates not-null constraint : UPDATE "lookup_keys" SET "default_value" = '--- /etc/prout2', "description" = '', "validator_type" = '', "updated_at" = NULL WHERE "lookup_keys"."id" = 1
app/controllers/puppetclasses_controller.rb:52:in `update'
lib/foreman/thread_session.rb:31:in `clear_thread'
i also tried updating by SQL the value, but then i get an error when actually overriding the parameter within a host definition. in that case, i get
unknown attribute: managed_id
with this full trace
ActiveRecord::UnknownAttributeError
unknown attribute: managed_id
app/models/host/managed.rb:210:in `lookup_values_attributes='
app/models/host/managed.rb:200:in `each_value'
app/models/host/managed.rb:200:in `lookup_values_attributes='
app/controllers/hosts_controller.rb:106:in `update'
app/models/taxonomy.rb:48:in `no_taxonomy_scope'
app/models/taxonomy.rb:55:in `as_taxonomy'
lib/foreman/thread_session.rb:140:in `as_location'
app/models/taxonomy.rb:54:in `as_taxonomy'
lib/foreman/thread_session.rb:105:in `as_org'
app/models/taxonomy.rb:53:in `as_taxonomy'
app/models/taxonomy.rb:47:in `no_taxonomy_scope'
app/controllers/hosts_controller.rb:105:in `update'
lib/foreman/thread_session.rb:31:in `clear_thread'
Updated by Antony Perigault over 11 years ago
Same error when I attempt to override smart parameter.
Updated by Ohad Levy over 11 years ago
which version of foreman is that? 1.1 or git ? if its git, whats the SHA1 of your HEAD?
Updated by Julien Recurt over 11 years ago
In my case, I've got the same issue on actual branch develop (9415a01d2516d00375d83dc41642b0175446b26c)
Updated by Karim Boumedhel over 11 years ago
using git version, just run a git pull+bundle update and still get the same errors.
Updated by Tomer Brisker over 8 years ago
- Description updated (diff)
- Status changed from New to Resolved
This works well in current versions. Marking as resolved.