Project

General

Profile

Actions

Bug #36299

closed

The migration for adding the new ansible_callback_enabled column is failing on nightly Katello

Added by Nofar Alfassi about 1 year ago. Updated 11 months ago.


Description

[root@pipe-katello-server-nightly-centos8-stream forklift]# /usr/sbin/foreman-rake db:migrate
20221003153000 AddAnsibleCallbackEnabledToTemplates: migrating ===========
-- add_column(:templates, :ansible_callback_enabled, :boolean, {:default=>false})
-> 0.0104s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

Couldn't find Template without an ID
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:456:in `find_with_ids'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:69:in `find'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/querying.rb:22:in `find'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/core.rb:344:in `find'
/usr/share/gems/gems/foreman_ansible-11.1.2/db/migrate/20221003153000_add_ansible_callback_enabled_to_templates.rb:7:in `block in change'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/delegation.rb:88:in `each'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/delegation.rb:88:in `each'
/usr/share/gems/gems/foreman_ansible-11.1.2/db/migrate/20221003153000_add_ansible_callback_enabled_to_templates.rb:6:in `change'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:867:in `exec_migration'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:851:in `block (2 levels) in migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:850:in `block in migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:849:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1037:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1329:in `block in execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1380:in `block in ddl_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1380:in `ddl_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1328:in `execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1302:in `each'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1302:in `migrate_without_lock'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1251:in `block in migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1401:in `block in with_advisory_lock'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1397:in `with_advisory_lock'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1251:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1086:in `up'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1061:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <top (required)>'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/databases.rake:90:in `each'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

Caused by:
ActiveRecord::RecordNotFound: Couldn't find Template without an ID
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:456:in `find_with_ids'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/finder_methods.rb:69:in `find'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/querying.rb:22:in `find'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/core.rb:344:in `find'
/usr/share/gems/gems/foreman_ansible-11.1.2/db/migrate/20221003153000_add_ansible_callback_enabled_to_templates.rb:7:in `block in change'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/delegation.rb:88:in `each'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/relation/delegation.rb:88:in `each'
/usr/share/gems/gems/foreman_ansible-11.1.2/db/migrate/20221003153000_add_ansible_callback_enabled_to_templates.rb:6:in `change'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:867:in `exec_migration'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:851:in `block (2 levels) in migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:850:in `block in migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:849:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1037:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1329:in `block in execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1380:in `block in ddl_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `block in transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/transaction.rb:319:in `block in within_new_transaction'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/usr/share/gems/gems/activesupport-6.1.7.3/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/transaction.rb:317:in `within_new_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/database_statements.rb:320:in `transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/transactions.rb:209:in `transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1380:in `ddl_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1328:in `execute_migration_in_transaction'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1302:in `each'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1302:in `migrate_without_lock'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1251:in `block in migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1401:in `block in with_advisory_lock'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1416:in `block in with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:462:in `with_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1416:in `with_advisory_lock_connection'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1397:in `with_advisory_lock'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1251:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1086:in `up'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/migration.rb:1061:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/tasks/database_tasks.rb:237:in `migrate'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/databases.rake:92:in `block (3 levels) in <top (required)>'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/databases.rake:90:in `each'
/usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/railties/databases.rake:90:in `block (2 levels) in <top (required)>'
/usr/share/gems/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)


Related issues 1 (0 open1 closed)

Related to Ansible - Bug #35585: Unable to enable callback plugin per-templateClosedNofar AlfassiActions
Actions #1

Updated by Nofar Alfassi about 1 year ago

  • Related to Bug #35585: Unable to enable callback plugin per-template added
Actions #2

Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_ansible/pull/615 added
Actions #3

Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases foreman_ansible-11.1.2 added
Actions #4

Updated by Nofar Alfassi about 1 year ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Nofar Alfassi about 1 year ago

  • Fixed in Releases foreman_ansible-11.2.0 added
  • Fixed in Releases deleted (foreman_ansible-11.1.2)
Actions #6

Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/635 added
Actions #7

Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/636 added
Actions #8

Updated by Nofar Alfassi 11 months ago

  • Pull request deleted (https://github.com/theforeman/foreman_ansible/pull/636, https://github.com/theforeman/foreman_ansible/pull/635)
Actions #9

Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/641 added
Actions #10

Updated by The Foreman Bot 11 months ago

  • Pull request https://github.com/theforeman/foreman_ansible/pull/643 added
Actions #11

Updated by The Foreman Bot 11 months ago

  • Fixed in Releases foreman_ansible-10.0.0 added
Actions

Also available in: Atom PDF