Project

General

Profile

Actions

Bug #24231

open

foreman-rake db:seed error

Added by Dima Nilsen over 6 years ago. Updated about 6 years ago.

Status:
Need more information
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

after upgrading form 1.16 to 1.17 a get


# foreman-rake db:seed
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Fixnum is deprecated
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/schema_generator.rb:19: warning: constant ::Bignum is deprecated
/usr/share/foreman/lib/core_extensions.rb:183: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:292:in `block in require'
Seeding /usr/share/foreman/db/seeds.d/020-partition_tables_list.rb
Seeding /usr/share/foreman/db/seeds.d/020-permissions_list.rb
Seeding /usr/share/foreman/db/seeds.d/020-provisioning_templates_list.rb
Seeding /usr/share/foreman/db/seeds.d/020-roles_list.rb
Seeding /usr/share/foreman/db/seeds.d/030-auth_sources.rb
Seeding /usr/share/foreman/db/seeds.d/030-permissions.rb
Seeding /usr/share/foreman/db/seeds.d/035-admin.rb
Seeding /usr/share/foreman/db/seeds.d/040-roles.rb
rake aborted!
NoMethodError: undefined method `destroy!' for nil:NilClass
/usr/share/foreman/app/models/role.rb:211:in `map'
/usr/share/foreman/app/models/role.rb:211:in `remove_permissions!'
/usr/share/foreman/lib/seed_helper.rb:92:in `block in update_role_permissions'
/usr/share/foreman/app/models/role.rb:234:in `ignore_locking'
/usr/share/foreman/lib/seed_helper.rb:84:in `update_role_permissions'
/usr/share/foreman/lib/seed_helper.rb:63:in `create_role'
/usr/share/foreman/db/seeds.d/040-roles.rb:10:in `block (4 levels) in <top (required)>'
/usr/share/foreman/db/seeds.d/040-roles.rb:9:in `each'
/usr/share/foreman/db/seeds.d/040-roles.rb:9:in `block (3 levels) in <top (required)>'
/usr/share/foreman/app/models/concerns/authorizable.rb:115:in `skip_permission_check'
/usr/share/foreman/db/seeds.d/040-roles.rb:5:in `block (2 levels) in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.4.1/lib/audited/auditor.rb:283:in `without_auditing'
/usr/share/foreman/db/seeds.d/040-roles.rb:4:in `block in <top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/audited-4.4.1/lib/audited/auditor.rb:283:in `without_auditing'
/usr/share/foreman/db/seeds.d/040-roles.rb:3:in `<top (required)>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/usr/share/foreman/db/seeds.rb:38:in `block (2 levels) in <top (required)>'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:93:in `as'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:99:in `as_anonymous_admin'
/usr/share/foreman/db/seeds.rb:37:in `block in <top (required)>'
/usr/share/foreman/db/seeds.rb:31:in `each'
/usr/share/foreman/db/seeds.rb:31:in `<top (required)>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `block in load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:258:in `load_dependency'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.4/lib/active_support/dependencies.rb:286:in `load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/engine.rb:549:in `load_seed'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/tasks/database_tasks.rb:270:in `load_seed'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/railties/databases.rake:184:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)

I have installed:


# rpm -qa | grep foreman
tfm-rubygem-hammer_cli_foreman-0.12.0-2.el7.noarch
foreman-debug-1.17.1-1.el7.noarch
tfm-rubygem-foreman_setup-6.0.0-1.fm1_17.el7.noarch
foreman-selinux-1.17.1-1.el7.noarch
foreman-release-1.17.1-1.el7.noarch
foreman-ovirt-1.17.1-1.el7.noarch
foreman-cli-1.17.1-1.el7.noarch
foreman-installer-1.14.3-1.el7.noarch
foreman-release-scl-4-1.el7.noarch
foreman-compute-1.17.1-1.el7.noarch
tfm-rubygem-foreman_templates-5.0.1-2.fm1_17.el7.noarch
tfm-rubygem-foreman_discovery-11.0.0-1.fm1_17.el7.noarch
foreman-postgresql-1.17.1-1.el7.noarch
foreman-1.17.1-1.el7.noarch
foreman-vmware-1.17.1-1.el7.noarch


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #24697: foreman-rake db:seed fails on upgrade to Foraman 1.17.1ClosedTomer BriskerActions
Actions #1

Updated by Marek Hulán about 6 years ago

  • Bugzilla link set to 1646763
Actions #2

Updated by Marek Hulán about 6 years ago

  • Status changed from New to Need more information

Was this resolved by #24697 in 1.17.4?

Actions #3

Updated by Marek Hulán about 6 years ago

  • Related to Bug #24697: foreman-rake db:seed fails on upgrade to Foraman 1.17.1 added
Actions

Also available in: Atom PDF