Project

General

Profile

Bug #27631

foreman-rake db:migrate fails with hidden parameters

Added by Anthony Chevalet 12 months ago. Updated 12 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
DB migrations
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

During migration from 1.21 to 1.22, foreman-rake db:migrate fails with error:

== 20181105061336 CastKeyTypesAndValuesInParameters: migrating ================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

765: unexpected token at '*****'
...

I have a domain parameter with the 'hidden' flag. Parameter value is shown as '*****' and is not supported by 20181105061336_cast_key_types_and_values_in_parameters.rb


Related issues

Related to Foreman - Feature #4127: Array, Boolean and other types support in "hostgroup parameters"Closed

History

#1 Updated by Tomer Brisker 12 months ago

  • Related to Feature #4127: Array, Boolean and other types support in "hostgroup parameters" added

#2 Updated by Anthony Chevalet 12 months ago

  • Status changed from New to Rejected

my bad.. the parameter was actually a string with value "*****" and hidden_value: false, wrongly generated by an import script..

irb(main):002:0> Parameter.where(name: 'domainAdminAccountPassword')
=> #<ActiveRecord::Relation [#<DomainParameter id: 3, name: "domainAdminAccountPassword", value: "*****", reference_id: 3, created_at: "2018-08-21 22:50:09", updated_at: "2018-08-22 00:11:55", type: "DomainParameter", priority: 30, hidden_value: false, key_type: nil>]>

Also available in: Atom PDF