Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeding fails on production setup during the upgrade #749

Open
ares opened this issue Jun 28, 2022 · 3 comments
Open

Seeding fails on production setup during the upgrade #749

ares opened this issue Jun 28, 2022 · 3 comments

Comments

@ares
Copy link
Member

ares commented Jun 28, 2022

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Remote execution features is invalid
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/validations.rb:80:in `raise_validation_error'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/validations.rb:53:in `save!'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/transactions.rb:302:in `block in save!'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/transactions.rb:302:in `save!'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/suppressor.rb:48:in `save!'
/usr/share/gems/gems/foreman_remote_execution-7.1.0/app/models/job_template.rb:72:in `import_raw!'
/usr/share/gems/gems/foreman_rh_cloud-5.0.37/db/seeds.d/50_job_templates.rb:6:in `block (3 levels) in <top (required)>'
/usr/share/gems/gems/foreman_rh_cloud-5.0.37/db/seeds.d/50_job_templates.rb:5:in `each'
/usr/share/gems/gems/foreman_rh_cloud-5.0.37/db/seeds.d/50_job_templates.rb:5:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/audited-4.10.0/lib/audited/auditor.rb:395:in `without_auditing'
/usr/share/gems/gems/foreman_rh_cloud-5.0.37/db/seeds.d/50_job_templates.rb:4:in `block in <top (required)>'
/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/gems/gems/foreman_rh_cloud-5.0.37/db/seeds.d/50_job_templates.rb:3:in `<top (required)>'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:326:in `load'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:326:in `block in load'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:326: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/app/services/foreman/advisory_lock_manager.rb:21:in `block in with_transaction_lock'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/foreman/app/services/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:15:in `<top (required)>'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:326:in `load'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:326:in `block in load'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/dependencies.rb:326: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'
/usr/share/gems/gems/railties-6.1.6/lib/rails/engine.rb:566:in `block in load_seed'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/execution_wrapper.rb:91:in `wrap'
/usr/share/gems/gems/railties-6.1.6/lib/rails/engine.rb:640:in `block (2 levels) in <class:Engine>'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:126:in `instance_exec'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/usr/share/gems/gems/activesupport-6.1.6/lib/active_support/callbacks.rb:137:in `run_callbacks'
/usr/share/gems/gems/railties-6.1.6/lib/rails/engine.rb:566:in `load_seed'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/tasks/database_tasks.rb:450:in `load_seed'
/usr/share/gems/gems/activerecord-6.1.6/lib/active_record/railties/databases.rake:392:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
@ares
Copy link
Member Author

ares commented Sep 30, 2022

Still the same issue even with the latest release

ActiveRecord::RecordInvalid: Validation failed: Remote execution features is invalid
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/validations.rb:80:in `raise_validation_error'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/validations.rb:53:in `save!'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:302:in `block in save!'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:354:in `block in with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:318:in `transaction'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:350:in `with_transaction_returning_status'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:302:in `save!'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/suppressor.rb:48:in `save!'
/usr/share/gems/gems/foreman_remote_execution-8.0.0/app/models/job_template.rb:72:in `import_raw!'
/usr/share/gems/gems/foreman_rh_cloud-6.0.43/db/seeds.d/50_job_templates.rb:6:in `block (3 levels) in <top (required)>'
/usr/share/gems/gems/foreman_rh_cloud-6.0.43/db/seeds.d/50_job_templates.rb:5:in `each'
/usr/share/gems/gems/foreman_rh_cloud-6.0.43/db/seeds.d/50_job_templates.rb:5:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/audited-5.0.2/lib/audited/auditor.rb:402:in `without_auditing'
/usr/share/gems/gems/foreman_rh_cloud-6.0.43/db/seeds.d/50_job_templates.rb:4:in `block in <top (required)>'
/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/gems/gems/foreman_rh_cloud-6.0.43/db/seeds.d/50_job_templates.rb:3:in `<top (required)>'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326:in `load'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326:in `block in load'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326: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/app/services/foreman/advisory_lock_manager.rb:21:in `block in with_transaction_lock'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/foreman/app/services/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:15:in `<top (required)>'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326:in `load'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326:in `block in load'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:299:in `load_dependency'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/dependencies.rb:326: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'
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/engine.rb:566:in `block in load_seed'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/execution_wrapper.rb:91:in `wrap'
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/engine.rb:640:in `block (2 levels) in <class:Engine>'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:126:in `instance_exec'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/usr/share/gems/gems/activesupport-6.1.6.1/lib/active_support/callbacks.rb:137:in `run_callbacks'
/usr/share/gems/gems/railties-6.1.6.1/lib/rails/engine.rb:566:in `load_seed'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/tasks/database_tasks.rb:450:in `load_seed'
/usr/share/gems/gems/activerecord-6.1.6.1/lib/active_record/railties/databases.rake:392:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

@Ron-Lavi
Copy link
Member

Ron-Lavi commented Oct 3, 2022

Looks similar to the issue we have in theforeman/foreman_ansible#561 (comment)

@ares
Copy link
Member Author

ares commented Jan 17, 2023

Still the issue with foreman_rh_cloud-6.0.44, any thoughts @ShimShtein ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants