Actions
Bug #20968
openinvalid YAML in lookup keys can break db migrations
Status:
New
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Description
StandardError: An error has occurred, this and all later migrations canceled: (<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 5 /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/coders/yaml_column.rb:24:in `load' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/type/serialized.rb:18:in `deserialize' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/attribute.rb:140:in `type_cast' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/attribute.rb:38:in `value' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/attribute_set.rb:44:in `fetch_value' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/attribute_methods/read.rb:66:in `_read_attribute' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/attribute_methods/read.rb:36:in `__temp__4656661657c647f56716c65756' /home/ohad/git/foreman/db/migrate/20170112175131_migrate_template_to_parameters_macros.rb:25:in `block (2 levels) in up' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/relation/delegation.rb:38:in `each' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/relation/delegation.rb:38:in `each' /home/ohad/git/foreman/db/migrate/20170112175131_migrate_template_to_parameters_macros.rb:24:in `block in up' /home/ohad/git/foreman/db/migrate/20170112175131_migrate_template_to_parameters_macros.rb:23:in `each' /home/ohad/git/foreman/db/migrate/20170112175131_migrate_template_to_parameters_macros.rb:23:in `up' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:792:in `exec_migration' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:773:in `block (2 levels) in migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:772:in `block in migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:771:in `migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration/compatibility.rb:121:in `migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:951:in `migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1232:in `block in execute_migration_in_transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `block in ddl_transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/transactions.rb:211:in `transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1300:in `ddl_transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1231:in `execute_migration_in_transaction' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1203:in `block in migrate_without_lock' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `each' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1202:in `migrate_without_lock' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1152:in `migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:1006:in `up' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/migration.rb:984:in `migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/tasks/database_tasks.rb:163:in `migrate' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activerecord-5.0.6/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:287:in `load' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:287:in `block in load' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency' /home/ohad/.rvm/gems/ruby-2.4.1/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:287:in `load' -e:1:in `<main>' Psych::SyntaxError: (<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 5
Updated by Ohad Levy about 7 years ago
for the record, this is the record that was breaking:
id|key|created_at|updated_at|puppetclass_id|default_value|path|description|validator_type|validator_rule|key_type|override|required|merge_overrides|avoid_duplicates|omit|type|merge_default|hidden_value 978|allowed_hosts|2013-01-06 08:38:52.000000|2013-01-06 08:38:52.000000||--- %|||||string|f|f|f|f||PuppetclassLookupKey|f|f
Updated by Ivan Necas about 7 years ago
- Related to Feature #16740: Host parameters should be available in templates using some macro added
Actions