Attempted to upgrade our lab Foreman environment today from 1.16.0 to 1.17.1
Below error stack presents anytime we start up a Foreman Node in the cluster. Remote Execution RPM version is: 1.4.5-2.fm1_17.el7
We are able to get everything “up” by removing this plugin, after which foreman starts without issue. However upon reinstallation (We rely on the Foreman_ansible plugin) it does not work. db_seed and db_migrate seem to kick off without any errors, but cannot get this error to clear, or foreman to start, with this plugin installed.
Any help/insight is appreciated!
ERF73-2603 [Foreman::PermissionMissingException]: some permissions were not found (Foreman::PermissionMissingException)
/usr/share/foreman/app/models/role.rb:330:in `permission_records'
/usr/share/foreman/app/models/role.rb:170:in `find_for_permission_removal'
/usr/share/foreman/app/models/role.rb:211:in `remove_permissions!'
/usr/share/foreman/app/services/foreman/plugin/role_lock.rb:47:in `block in update_plugin_role_permissions'
/usr/share/foreman/app/models/role.rb:85:in `ignore_locking'
/usr/share/foreman/app/services/foreman/plugin/role_lock.rb:43:in `update_plugin_role_permissions'
/usr/share/foreman/app/services/foreman/plugin/role_lock.rb:22:in `process_role'
/usr/share/foreman/app/services/foreman/plugin/role_lock.rb:13:in `block (2 levels) in register_role'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
/opt/rh/rh-ruby24/root/usr/share/ruby/monitor.rb:214:in `mon_synchronize'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
/usr/share/foreman/app/services/foreman/plugin/role_lock.rb:12:in `block in register_role'
/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/app/services/foreman/plugin/role_lock.rb:11:in `register_role'
/usr/share/foreman/app/registries/foreman/plugin.rb:249:in `role'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.4.5/lib/foreman_remote_execution/engine.rb:85:in `block (2 levels) in <class:Engine>'
/usr/share/foreman/app/registries/foreman/plugin.rb:67:in `instance_eval'
/usr/share/foreman/app/registries/foreman/plugin.rb:67:in `register'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.4.5/lib/foreman_remote_execution/engine.rb:33:in `block in <class:Engine>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `instance_exec'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:30:in `run'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:59:in `block in run_initializers'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:228:in `block in tsort_each'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:431:in `each_strongly_connected_component_from'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:349:in `block in each_strongly_connected_component'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:347:in `each'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:347:in `call'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:347:in `each_strongly_connected_component'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:226:in `tsort_each'
/opt/rh/rh-ruby24/root/usr/share/ruby/tsort.rb:205:in `tsort_each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/initializable.rb:58:in `run_initializers'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/application.rb:353:in `initialize!'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `public_send'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/railties-5.1.4/lib/rails/railtie.rb:185:in `method_missing'
/usr/share/foreman/config/environment.rb:5:in `<top (required)>'
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
config.ru:3:in `block in <main>'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
config.ru:1:in `new'
config.ru:1:in `<main>'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in `eval'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:105:in `preload_app'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:150:in `<module:App>'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/usr/share/gems/gems/passenger-4.0.18/helper-scripts/rack-preloader.rb:28:in `<main>'