Project

General

Profile

Actions

Bug #34482

open

Existing mismatch-report blocks UI after upgrade

Added by Markus Bucher about 2 years ago.

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

Description

I open this to foreman, because taxonomy is part of foreman. Though, it might be a Katello-issue looking at the log, so please move if that is the case.

Appears when Taxonomy MismatchReport is not empty. After upgrade from foreman-2.3 to foreman-2.5 (katello-3.18.x to katello-4.1), UI can no longer be accessed.

rake db:seed fails in katello-4.1.4/db/seeds.d/102-organizations.rb:8

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Provisioning templates expecting provisioning templates used by hosts or inherited (check mismatches report).
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:80:in `raise_validation_error'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:53:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:318:in `block in save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:318:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/suppressor.rb:48:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/app/lib/katello/lazy_accessor.rb:67:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:31:in `block in save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:127:in `dynflow_task_wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:31:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/app/services/katello/organization_creator.rb:31:in `block in seed!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/app/services/katello/organization_creator.rb:29:in `seed!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/app/services/katello/organization_creator.rb:8:in `block (2 levels) in seed_all_organizations!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/relation/delegation.rb:87:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/app/services/katello/organization_creator.rb:7:in `block in seed_all_organizations!'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/app/services/katello/organization_creator.rb:6:in `seed_all_organizations!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.4/db/seeds.d/102-organizations.rb:8:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `load'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `block in load'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:291:in `load_dependency'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `load'
/usr/share/foreman/app/services/foreman_seeder.rb:51:in `block (3 levels) in execute'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:108:in `as'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
/usr/share/foreman/app/services/foreman_seeder.rb:50:in `block (2 levels) in execute'
/usr/share/foreman/app/services/foreman_seeder.rb:44:in `each'
/usr/share/foreman/app/services/foreman_seeder.rb:44:in `block in execute'
/usr/share/foreman/lib/foreman/advisory_lock_manager.rb:20:in `block in with_transaction_lock'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/usr/share/foreman/lib/foreman/advisory_lock_manager.rb:17:in `with_transaction_lock'
/usr/share/foreman/app/services/foreman_seeder.rb:38:in `execute'
/usr/share/foreman/db/seeds.rb:14:in `<top (required)>'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `load'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `block in load'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:291:in `load_dependency'
/opt/theforeman/tfm/root/usr/share/gems/gems/activesupport-6.0.3.7/lib/active_support/dependencies.rb:318:in `load'
/usr/share/foreman/config/initializers/0_print_time_spent.rb:38:in `block in load'
/usr/share/foreman/config/initializers/0_print_time_spent.rb:17:in `benchmark'
/usr/share/foreman/config/initializers/0_print_time_spent.rb:38:in `load'
/opt/theforeman/tfm/root/usr/share/gems/gems/railties-6.0.3.7/lib/rails/engine.rb:559:in `load_seed'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/tasks/database_tasks.rb:440:in `load_seed'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/railties/databases.rake:331:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby27/root/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:seed
(See full trace by running task with --trace)
User with login admin already exists, not seeding as admin.

UI is not accessible anymore.

2022-02-21T21:21:46 [I|app|ccf93f5a] Started GET "/users/login" for XXX.XXX.XXX.XXX at 2022-02-21 21:21:46 +0100
2022-02-21T21:21:46 [F|app|ccf93f5a]   
 ccf93f5a | ActiveRecord::RecordInvalid (Validation failed: Provisioning templates expecting provisioning templates used by hosts or inherited (check mismatches report).):
 ccf93f5a |   
 ccf93f5a | katello (4.1.4) app/lib/katello/lazy_accessor.rb:67:in `save!'
 ccf93f5a | foreman-tasks (4.1.5) app/models/foreman_tasks/concerns/action_triggering.rb:31:in `block in save!'
 ccf93f5a | foreman-tasks (4.1.5) app/models/foreman_tasks/concerns/action_triggering.rb:127:in `dynflow_task_wrap'
 ccf93f5a | foreman-tasks (4.1.5) app/models/foreman_tasks/concerns/action_triggering.rb:31:in `save!'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:31:in `block in seed!'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:29:in `seed!'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:44:in `block in create!'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:43:in `create!'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:19:in `block (2 levels) in create_all_organizations!'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:17:in `block in create_all_organizations!'
 ccf93f5a | app/models/concerns/foreman/thread_session.rb:108:in `as'
 ccf93f5a | app/models/concerns/foreman/thread_session.rb:114:in `as_anonymous_admin'
 ccf93f5a | katello (4.1.4) app/services/katello/organization_creator.rb:16:in `create_all_organizations!'
 ccf93f5a | katello (4.1.4) lib/katello/middleware/organization_created_enforcer.rb:12:in `call'
 ccf93f5a | katello (4.1.4) lib/katello/middleware/event_daemon.rb:10:in `call'
 ccf93f5a | lib/foreman/middleware/telemetry.rb:10:in `call'
 ccf93f5a | lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
 ccf93f5a | lib/foreman/middleware/logging_context_session.rb:22:in `call'
 ccf93f5a | lib/foreman/middleware/logging_context_request.rb:11:in `call'
 ccf93f5a | katello (4.1.4) lib/katello/prevent_json_parsing.rb:12:in `call'

No data to display

Actions

Also available in: Atom PDF