Project

General

Profile

Actions

Bug #13529

closed

Duplicate permissions are allowed and not recognized

Added by Edward Clay almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

I recently performed a yum upgrade on my katello/foreman server and evidently it upgraded me to a newer version of katello/foreman.

katello 2.4.0-7
foreman 1.10.1-1

I attempted a katello-install --upgrade and it failed with a permissions error. So I attempted the manual upgrade process found on http://www.katello.org/docs/2.2/upgrade/. It appears that the upgrade is failing on forman-rake db:migrate. I ran it with a --trace option and get the following.

  1. foreman-rake --trace db:migrate
    • Invoke db:migrate (first_time)
    • Invoke environment (first_time)
    • Execute environment
      API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
      rake aborted!
      some permissions were not found
      /usr/share/foreman/app/models/role.rb:132:in `add_permissions'
      /usr/share/foreman/app/models/role.rb:147:in `add_permissions!'
      /usr/share/foreman/app/services/foreman/plugin.rb:216:in `block in role'
      /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
      /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
      /usr/share/foreman/app/services/foreman/plugin.rb:214:in `role'
      /opt/theforeman/tfm/root/usr/share/gems/gems/ovirt_provision_plugin-1.0.1/lib/ovirt_provision_plugin/engine.rb:26:in `block (2 levels) in <class:Engine>'
      /usr/share/foreman/app/services/foreman/plugin.rb:64:in `instance_eval'
      /usr/share/foreman/app/services/foreman/plugin.rb:64:in `register'
      /opt/theforeman/tfm/root/usr/share/gems/gems/ovirt_provision_plugin-1.0.1/lib/ovirt_provision_plugin/engine.rb:17:in `block in <class:Engine>'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `block in run_initializers'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
      /usr/share/foreman/config/environment.rb:5:in `<top (required)>'
      /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
      /opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require'
      /opt/rh/ruby193/root/usr/share/gems/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
      /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require'
      /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:236:in `load_dependency'
      /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:103:in `require_environment!'
      /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:295:in `block (2 levels) in initialize_tasks'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `call'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:205:in `block in execute'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `each'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:200:in `execute'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:158:in `block in invoke_with_call_chain'
      /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:176:in `block in invoke_prerequisites'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in `each'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:174:in `invoke_prerequisites'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:157:in `block in invoke_with_call_chain'
      /opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:151:in `invoke_with_call_chain'
      /opt/rh/ruby193/root/usr/share/ruby/rake/task.rb:144:in `invoke'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:116:in `invoke_task'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block (2 levels) in top_level'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `each'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:94:in `block in top_level'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:88:in `top_level'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:66:in `block in run'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:133:in `standard_exception_handling'
      /opt/rh/ruby193/root/usr/share/ruby/rake/application.rb:63:in `run'
      /opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
      Tasks: TOP => db:migrate => environment

I'm not able to find the cause of this error and currently foreman is down.


Files

db_migrate.log db_migrate.log 26.3 KB Edward Clay, 02/02/2016 05:36 PM

Related issues 2 (0 open2 closed)

Related to Discovery - Bug #9963: Upgrade from 1.2 to 2.0 fails with "some permissions were not found" ArgumentErrorClosed03/31/2015Actions
Related to Discovery - Bug #9895: user can't vew discovery_rules with "Discovery Reader" roleClosedOri Rabin03/25/2015Actions
Actions

Also available in: Atom PDF