Actions
Bug #20231
closedrake db:seed fails
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
Updating a foreman git checkout from a3213b1b4571f26a7427e3d43223cc696c3f0bf9
then running
bundle update
npm update
bundle exec rake db:migrate
bundle exec rake db:seed
fails in the last step with:
exec bin/rake db:seed Running via Spring preloader in process 4752 Seeding /var/scratch/src/foreman/foreman/db/seeds.d/02-partition_tables_list.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/02-permissions_list.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/02-provisioning_templates_list.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/02-roles_list.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/03-auth_sources.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/03-permissions.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/03-roles.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/04-admin.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/05-taxonomies.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/06-architectures.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/07-provisioning_templates.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/08-partition_tables.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/10-installation_media.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/11-smart_proxy_features.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/13-compute_profiles.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/15-bookmarks.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/16-mail_notifications.rb Seeding /var/scratch/src/foreman/foreman/db/seeds.d/17-notification_blueprints.rb rake aborted! JSON::ParserError: 784: unexpected token at 'null' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/store.rb:190:in `load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/type/serialized.rb:58:in `default_value?' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/type/serialized.rb:16:in `type_cast_from_database' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute.rb:104:in `type_cast' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute.rb:42:in `original_value' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute.rb:37:in `value' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_set.rb:31:in `fetch_value' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_methods/read.rb:93:in `_read_attribute' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_methods.rb:375:in `clone_attribute_value' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_methods/dirty.rb:124:in `old_attribute_value' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_methods/dirty.rb:95:in `write_attribute' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_methods.rb:50:in `__temp__16364796f6e637' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_assignment.rb:54:in `public_send' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_assignment.rb:54:in `_assign_attribute' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_assignment.rb:65:in `block in assign_nested_parameter_attributes' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_assignment.rb:65:in `each' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_assignment.rb:65:in `assign_nested_parameter_attributes' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/attribute_assignment.rb:45:in `assign_attributes' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/persistence.rb:264:in `block in update!' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/transactions.rb:351:in `block in with_transaction_returning_status' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/transactions.rb:220:in `transaction' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/transactions.rb:348:in `with_transaction_returning_status' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/persistence.rb:263:in `update!' /var/scratch/src/foreman/foreman/app/services/ui_notifications/seed.rb:13:in `configure' /var/scratch/src/foreman/foreman/db/seeds.d/17-notification_blueprints.rb:38:in `block in <top (required)>' /var/scratch/src/foreman/foreman/db/seeds.d/17-notification_blueprints.rb:38:in `each' /var/scratch/src/foreman/foreman/db/seeds.d/17-notification_blueprints.rb:38:in `<top (required)>' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `block in load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load' /var/scratch/src/foreman/foreman/db/seeds.rb:38:in `block in <top (required)>' /var/scratch/src/foreman/foreman/db/seeds.rb:36:in `each' /var/scratch/src/foreman/foreman/db/seeds.rb:36:in `<top (required)>' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `block in load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/railties-4.2.9/lib/rails/engine.rb:547:in `load_seed' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/tasks/database_tasks.rb:253:in `load_seed' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.9/lib/active_record/railties/databases.rake:173:in `block (2 levels) in <top (required)>' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `block in load' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:240:in `load_dependency' /var/scratch/src/foreman/foreman/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.9/lib/active_support/dependencies.rb:268:in `load' -e:1:in `<main>' Tasks: TOP => db:seed (See full trace by running task with --trace)
The line failing is
def load(yaml)
self.class.as_indifferent_hash(@coder.load(yaml || ''))
end
and yaml is ''. @coder.load('') fails with the empty string.
Actions