Project

General

Profile

Bug #15754

[Katello] rake db:seed failing with NoMethodError: undefined method `update_attributes!' for nil:NilClass

Added by Swapnil Abnave almost 6 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

CentOS Linux release 7.2.1511 (Core)
I did setup from (forklift)[[https://github.com/Katello/forklift]].
Did a Vagrant Deployment for centos7-devel: https://github.com/Katello/forklift#vagrant-deployment
--

After setup I did a rake db:drop and db:setup. Observed following failure.

~/foreman(develop ✔) rake db:setup
...
Seeding /home/vagrant/foreman/db/seeds.d/03-auth_sources.rb
Seeding /home/vagrant/foreman/db/seeds.d/03-permissions.rb
Seeding /home/vagrant/foreman/db/seeds.d/03-roles.rb
Seeding /home/vagrant/foreman/db/seeds.d/04-admin.rb
2016-07-20T08:36:08 [app] [D] Setting current user thread-local variable to foreman_admin
2016-07-20T08:36:08 [app] [D] Setting current user thread-local variable to foreman_api_admin
2016-07-20T08:36:08 [app] [D] Setting current user thread-local variable to foreman_admin
Login credentials: admin / 9z9uTQHUY9tevtsJ
2016-07-20T08:36:08 [app] [D] Setting current user thread-local variable to foreman_api_admin
Seeding /home/vagrant/foreman/db/seeds.d/05-taxonomies.rb
Seeding /home/vagrant/foreman/db/seeds.d/06-architectures.rb
Seeding /home/vagrant/foreman/db/seeds.d/07-provisioning_templates.rb
Seeding /home/vagrant/foreman/db/seeds.d/08-partition_tables.rb
Seeding /home/vagrant/foreman/db/seeds.d/10-installation_media.rb
Seeding /home/vagrant/katello/db/seeds.d/101-locations.rb
Seeding /home/vagrant/katello/db/seeds.d/102-organizations.rb
Seeding /home/vagrant/katello/db/seeds.d/103-provisioning_templates.rb
2016-07-20T08:36:09 [app] [D] Setting current user thread-local variable to foreman_api_admin
2016-07-20T08:36:10 [app] [D] Setting current user thread-local variable to nil
Seeding /home/vagrant/katello/db/seeds.d/104-proxy.rb
2016-07-20T08:36:10 [app] [D] Setting current user thread-local variable to foreman_api_admin
2016-07-20T08:36:10 [app] [D] Setting current user thread-local variable to nil
Seeding /home/vagrant/katello/db/seeds.d/106-mail_notifications.rb
2016-07-20T08:36:10 [app] [D] Setting current user thread-local variable to foreman_api_admin
2016-07-20T08:36:10 [app] [D] Setting current user thread-local variable to nil
Seeding /home/vagrant/katello/db/seeds.d/107-enable_dynflow.rb
2016-07-20T08:36:10 [app] [D] Setting current user thread-local variable to foreman_api_admin
rake aborted!
NoMethodError: undefined method `update_attributes!' for nil:NilClass
/home/vagrant/katello/db/seeds.d/107-enable_dynflow.rb:8:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/home/vagrant/foreman/db/seeds.rb:81:in `block in <top (required)>'
/home/vagrant/foreman/db/seeds.rb:79:in `each'
/home/vagrant/foreman/db/seeds.rb:79:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `block in load'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:268:in `load'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/railties-4.2.6/lib/rails/engine.rb:547:in `load_seed'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:250:in `load_seed'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:183:in `block (2 levels) in <top (required)>'
/home/vagrant/.rvm/gems/ruby-2.2.4/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:setup => db:seed
(See full trace by running task with --trace)

Error origin : https://github.com/Katello/katello/blob/master/db/seeds.d/107-enable_dynflow.rb#L8

--
I searched for `dynflow_enable_console` in foreman and katello code base couldn't find it anywhere. Is it deprecated and can be removed ?

--
Any directions to fix this ?

History

#1 Updated by Dominic Cleal almost 6 years ago

  • Project changed from Foreman to Katello
  • Category deleted (47)
  • Legacy Backlogs Release (now unused) deleted (160)

#2 Updated by Swapnil Abnave almost 6 years ago

I take it back. Migrations where pending on katello. I re-ran rake db:migrate and then seeded again. Everything looks good now.
This can be closed.
Thanks!

#3 Updated by Justin Sherrill almost 6 years ago

  • Status changed from New to Rejected
  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF