Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1652909 - Upgrade from 6.4 to 6.5 failed showing PG::UndefinedTable: ERROR: relation "katello_root_repositories" does not exist
Summary: Upgrade from 6.4 to 6.5 failed showing PG::UndefinedTable: ERROR: relation "...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Sync Plans
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.5.0
Assignee: Samir Jha
QA Contact: Nikhil Kathole
URL:
Whiteboard:
Depends On:
Blocks: 1653153
TreeView+ depends on / blocked
 
Reported: 2018-11-23 13:42 UTC by Nikhil Kathole
Modified: 2019-11-05 22:39 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:39:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25544 0 High Closed Upgrade issue 3.8 -> 3.9 2021-02-10 18:59:26 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:39:15 UTC

Description Nikhil Kathole 2018-11-23 13:42:12 UTC
Description of problem:
Upgrade from 6.4 to 6.5 failed at Upgrade Step: migrate_foreman...


 StandardError: An error has occurred, this and all later migrations canceled:
 
 PG::UndefinedTable: ERROR:  relation "katello_root_repositories" does not exist
 LINE 1: ...itories".* FROM "katello_repositories" INNER JOIN "katello_r...
                                                              ^
 : SELECT "katello_repositories".* FROM "katello_repositories" INNER JOIN "katello_root_repositories" ON "katello_repositories"."root_id" = "katello_root_repositories"."id" WHERE "katello_root_repositories"."product_id" = $1
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:669:in `prepare'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:669:in `block in prepare_statement'

 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:664:in `prepare_statement'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_cache'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `execute_and_clear'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:81:in `exec_query'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:469:in `select_prepared'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:55:in `select_all'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:101:in `select_all'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/querying.rb:41:in `find_by_sql'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/statement_cache.rb:108:in `execute'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/associations/collection_association.rb:314:in `find_target'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/associations/has_many_through_association.rb:194:in `find_target'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/associations/collection_association.rb:271:in `load_target'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/associations/collection_proxy.rb:46:in `load_target'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/associations/collection_proxy.rb:1032:in `records'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation.rb:498:in `blank?'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/core_ext/object/blank.rb:27:in `present?'
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/app/models/katello/product.rb:127:in `enabled?'
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/app/models/katello/sync_plan.rb:40:in `block in product_enabled'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in `each'
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/app/models/katello/sync_plan.rb:39:in `product_enabled'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:605:in `catch'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:605:in `block in default_terminator'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:199:in `block in halting'

 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `block in invoke_before'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `invoke_before'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:131:in `run_callbacks'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:816:in `_run_validate_callbacks'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/validations.rb:409:in `run_validations!'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/validations/callbacks.rb:118:in `block in run_validations!'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:132:in `run_callbacks'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:816:in `_run_validation_callbacks'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/validations/callbacks.rb:118:in `run_validations!'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activemodel-5.2.1/lib/active_model/validations.rb:339:in `valid?'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:67:in `valid?'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:84:in `perform_validations'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:52:in `save!'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:315:in `block in save!'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:252:in `transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:212:in `transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:315:in `save!'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/suppressor.rb:48:in `save!'
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb:9:in `block (2 levels) in change'
 /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:100:in `as'
 /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:106:in `as_anonymous_admin'
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb:7:in `block in change'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:70:in `block in find_each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:238:in `block in in_batches'

 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:222:in `loop'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:222:in `in_batches'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:135:in `find_in_batches'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/relation/batches.rb:69:in `find_each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/querying.rb:11:in `find_each'
 /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.9.0/db/migrate/20180814202747_add_recurring_logic_to_sync_plan.rb:6:in `change'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:814:in `exec_migration'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:797:in `block in migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:414:in `with_connection'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:796:in `migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:977:in `migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1343:in `block in ddl_transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:212:in `transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1343:in `ddl_transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1262:in `each'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1262:in `migrate_without_lock'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1210:in `block in migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1363:in `with_advisory_lock'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1210:in `migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1036:in `up'

 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/migration.rb:1011:in `migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
 /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
 
 Caused by:
 ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "katello_root_repositories" does not exist
 LINE 1: ...itories".* FROM "katello_repositories" INNER JOIN "katello_r...
                                                              ^
 : SELECT "katello_repositories".* FROM "katello_repositories" INNER JOIN "katello_root_repositories" ON "katello_repositories"."root_id" = "katello_root_repositories"."id" WHERE "katello_root_repositories"."product_id" = $1
 /opt/theforeman/tfm-ror52/root/usr/share/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:669:in `prepare'


Version-Release number of selected component (if applicable):
Satellite 6.5 snap 5


How reproducible: always


Steps to Reproduce:
1.   foreman-maintain upgrade run --target-version 6.5 -y

Actual results:
Upgrade failed with PG::UndefinedTable: ERROR:  relation "katello_root_repositories" does not exist
 LINE 1: ...itories".* FROM "katello_repositories" INNER JOIN "katello_r...
                                                              ^
 : SELECT "katello_repositories".* FROM "katello_repositories" INNER JOIN "katello_root_repositories" ON "katello_repositories"."root_id" = "katello_root_repositories"."id" WHERE "katello_root_repositories"."product_id" = $1

Expected results: Successful upgrade.


Additional info:

Comment 3 Tomer Brisker 2018-11-26 16:01:52 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25544 from this bug

Comment 4 Nikhil Kathole 2018-12-02 12:01:10 UTC
VERIFIED

Version tested:
Satellite 6.5 snap 6

Upgrade Step: migrate_foreman...
<trimmed>

 == 20180618195941 AddDescriptionToRepository: migrating =======================
 -- add_column(:katello_repositories, :description, :text, {:null=>true})
    -> 0.0165s
 == 20180618195941 AddDescriptionToRepository: migrated (0.0167s) ==============
 
 == 20180622105300 AddDockerTagsWhitelistToRepository: migrating ===============
 -- add_column(:katello_repositories, :docker_tags_whitelist, :text)
    -> 0.0012s
 == 20180622105300 AddDockerTagsWhitelistToRepository: migrated (0.0015s) ======
 
 == 20180625082051 RemoveAssociationsFromPtableSnippets: migrating =============
 == 20180625082051 RemoveAssociationsFromPtableSnippets: migrated (0.0302s) ====
 
 == 20180702102759 RemoveParamsValueLimit: migrating ===========================
 -- adapter_name()
    -> 0.0000s
 -- clear_cache!()
    -> 0.0000s
 -- quote_table_name(:parameters)
    -> 0.0001s
 -- execute("ALTER TABLE \"parameters\" ALTER COLUMN \"value\" TYPE text")
    -> 0.0034s
 -- adapter_name()
    -> 0.0000s
 -- clear_cache!()
    -> 0.0001s
 -- quote_table_name(:lookup_values)
    -> 0.0001s
 -- execute("ALTER TABLE \"lookup_values\" ALTER COLUMN \"value\" TYPE text")
    -> 0.0089s
 -- adapter_name()
    -> 0.0000s
 -- clear_cache!()
    -> 0.0000s
 -- quote_table_name(:lookup_keys)
    -> 0.0001s
 -- execute("ALTER TABLE \"lookup_keys\" ALTER COLUMN \"default_value\" TYPE text")
    -> 0.0032s
 == 20180702102759 RemoveParamsValueLimit: migrated (0.0175s) ==================
 
 == 20180705164601 RemoveLegacyPuppetHostnameSetting: migrating ================
 == 20180705164601 RemoveLegacyPuppetHostnameSetting: migrated (0.0102s) =======
 
 == 20180705191153 AddUpgradeTask: migrating ===================================
 -- adapter_name()
    -> 0.0000s
 -- create_table(:upgrade_tasks, {})
    -> 0.0198s
 -- add_index(:upgrade_tasks, :name, {:unique=>true})
    -> 0.0081s
 == 20180705191153 AddUpgradeTask: migrated (0.0282s) ==========================
 
 == 20180713154128 AddIndexOnRoleNames: migrating ==============================
 -- add_index(:roles, :name, {:unique=>true})
    -> 0.0099s
 == 20180713154128 AddIndexOnRoleNames: migrated (0.0101s) =====================
 
 == 20180715202514 OptimizeIndices: migrating ==================================
 -- remove_index(:audits, :id)
    -> 0.0131s
 -- remove_index(:audits, {:name=>"auditable_parent_index"})
    -> 0.0125s
 -- remove_index(:audits, {:name=>"associated_index"})
    -> 0.0011s
 -- add_index(:audits, [:associated_type, :associated_id])
    -> 0.0829s
 -- remove_index(:audits, {:name=>"auditable_index"})
    -> 0.0013s
 -- add_index(:audits, [:auditable_type, :auditable_id, :version])
    -> 0.1288s
 -- remove_index(:audits, [:user_id, :user_type])
    -> 0.0094s
 -- add_index(:audits, [:user_type, :user_id])
    -> 0.0284s
 -- remove_index(:bookmarks, [:owner_id, :owner_type])
    -> 0.0077s
 -- add_index(:bookmarks, [:owner_type, :owner_id])
    -> 0.0176s
 -- remove_index(:fact_names, :ancestry)
    -> 0.0084s
 -- remove_index(:fact_values, :fact_name_id)
    -> 0.0085s
 -- remove_index(:hosts, :type)
    -> 0.0194s
 -- index_name_exists?(:lookup_values, "index_lookup_values_on_priority")
    -> 0.0019s
 -- remove_index(:lookup_values, {:name=>"index_lookup_values_on_priority"})
    -> 0.0014s
 -- remove_index(:nics, {:name=>"index_by_type"})
    -> 0.0014s
 -- remove_index(:notification_recipients, :user_id)
    -> 0.0112s
 -- index_name_exists?(:parameters, "index_parameters_on_domain_id_and_type")
    -> 0.0020s
 -- index_name_exists?(:parameters, "index_parameters_on_hostgroup_id_and_type")
    -> 0.0018s
 -- index_name_exists?(:parameters, "index_parameters_on_host_id_and_type")
    -> 0.0019s
 -- remove_index(:parameters, {:name=>"index_parameters_on_host_id_and_type"})
    -> 0.0013s
 -- index_exists?(:parameters, [:reference_id, :type])
    -> 0.0051s
 -- remove_index(:parameters, :type)
    -> 0.0059s
 -- remove_index(:permissions, :name)
    -> 0.0068s
 -- remove_index(:reports, :host_id)
    -> 0.0141s
 -- remove_index(:reports, :type)
    -> 0.0130s
 -- remove_index(:reports, :reported_at)
    -> 0.0110s
 -- remove_index(:reports, [:reported_at, :host_id])
    -> 0.0094s
 -- remove_index(:taxable_taxonomies, [:taxable_id, :taxable_type])
    -> 0.0073s
 -- remove_index(:taxable_taxonomies, {:name=>"taxable_index"})
    -> 0.0012s
 -- add_index(:taxable_taxonomies, [:taxable_type, :taxable_id, :taxonomy_id], {:name=>"taxable_index", :unique=>true})
    -> 0.0470s
 -- remove_index(:user_roles, :owner_type)
    -> 0.0075s
 -- remove_index(:user_roles, [:owner_id, :owner_type])
    -> 0.0057s
 -- add_index(:user_roles, [:owner_type, :owner_id])
    -> 0.0096s
 == 20180715202514 OptimizeIndices: migrated (0.5102s) =========================
 
 == 20180806205420 AddIndexToContentViewVersion: migrating =====================
 -- add_index(:katello_content_view_versions, [:content_view_id, :major, :minor], {:unique=>true, :name=>"version_index"})
    -> 0.0121s
 == 20180806205420 AddIndexToContentViewVersion: migrated (0.0123s) ============
 
 == 20180807145652 CreateKatelloModuleStreams: migrating =======================
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_module_streams, {})
    -> 0.0410s
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_repository_module_streams, {})
    -> 0.0240s
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_module_profiles, {})
    -> 0.0279s
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_module_profile_rpms, {})
    -> 0.0236s
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_module_stream_artifacts, {})
    -> 0.0215s
 -- add_index(:katello_repository_module_streams, [:repository_id, :module_stream_id], {:unique=>true, :name=>:katello_module_streams_repo_stream_uniq})
    -> 0.0082s
 -- add_index(:katello_module_stream_artifacts, [:module_stream_id, :name], {:unique=>true, :name=>:katello_module_stream_artifacts_name_mod_stream_id_uniq})
    -> 0.0078s
 -- add_foreign_key(:katello_repository_module_streams, :katello_repositories, {:column=>:repository_id, :name=>:katello_repo_mod_stream_repo_id_fk})
    -> 0.0060s
 -- add_foreign_key(:katello_repository_module_streams, :katello_module_streams, {:column=>:module_stream_id, :name=>:katello_repo_mod_stream_mod_stream_id_fk})
    -> 0.0028s
 -- add_foreign_key(:katello_module_profiles, :katello_module_streams, {:column=>:module_stream_id, :name=>:katello_mod_profile_mod_stream_id_fk})
    -> 0.0036s
 -- add_foreign_key(:katello_module_profile_rpms, :katello_module_profiles, {:column=>:module_profile_id, :name=>:katello_mod_profile_rpm_mod_profile_id_fk})
    -> 0.0029s
 -- add_foreign_key(:katello_module_stream_artifacts, :katello_module_streams, {:column=>:module_stream_id, :name=>:katello_mod_stream_artifacts_mod_stream_id_fk})
    -> 0.0029s
 == 20180807145652 CreateKatelloModuleStreams: migrated (0.1746s) ==============
 
 == 20180807164405 RemoveRepositoryCpLabel: migrating ==========================
 -- remove_column(:katello_repositories, :cp_label)
    -> 0.0029s
 == 20180807164405 RemoveRepositoryCpLabel: migrated (0.0031s) =================
 
 == 20180808013432 AddSystemPurposeAttrs: migrating ============================
 -- adapter_name()
    -> 0.0001s
 -- create_table(:katello_purpose_addons, {})
    -> 0.0149s
 -- adapter_name()
    -> 0.0001s
 -- create_table(:katello_purpose_roles, {})
    -> 0.0149s
 -- adapter_name()
    -> 0.0001s
 -- create_table(:katello_purpose_usages, {})
    -> 0.0184s
 -- adapter_name()
    -> 0.0001s
 -- create_table(:katello_subscription_facet_purpose_addons, {})
    -> 0.0317s
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_subscription_facet_purpose_roles, {})
    -> 0.0246s
 -- adapter_name()
    -> 0.0000s
 -- create_table(:katello_subscription_facet_purpose_usages, {})
    -> 0.0250s
 -- add_foreign_key(:katello_subscription_facet_purpose_addons, :katello_subscription_facets, {:column=>:subscription_facet_id, :name=>:katello_sub_facet_purpose_addon_facet_id})
    -> 0.0050s
 -- add_foreign_key(:katello_subscription_facet_purpose_addons, :katello_purpose_addons, {:column=>:purpose_addon_id, :name=>:katello_sub_facet_purpose_addon_purpose_addon_id})
    -> 0.0027s
 -- add_foreign_key(:katello_subscription_facet_purpose_roles, :katello_subscription_facets, {:column=>:subscription_facet_id, :name=>:katello_sub_facet_purpose_role_facet_id})
    -> 0.0039s
 -- add_foreign_key(:katello_subscription_facet_purpose_roles, :katello_purpose_roles, {:column=>:purpose_role_id, :name=>:katello_sub_facet_purpose_role_purpose_role_id})
    -> 0.0036s
 -- add_foreign_key(:katello_subscription_facet_purpose_usages, :katello_subscription_facets, {:column=>:subscription_facet_id, :name=>:katello_sub_facet_purpose_usage_facet_id})
    -> 0.0033s
 -- add_foreign_key(:katello_subscription_facet_purpose_usages, :katello_purpose_usages, {:column=>:purpose_usage_id, :name=>:katello_sub_facet_purpose_usage_purpose_usage_id})
    -> 0.0026s
 == 20180808013432 AddSystemPurposeAttrs: migrated (0.1539s) ===================
 
 == 20180814202747 AddRecurringLogicToSyncPlan: migrating ======================
 -- add_column(:katello_sync_plans, :foreman_tasks_recurring_logic_id, :integer)
    -> 0.0017s
 -- add_column(:katello_sync_plans, :cron_expression, :string)
    -> 0.0010s
 -- add_foreign_key(:katello_sync_plans, :foreman_tasks_recurring_logics, {:name=>"katello_sync_plan_foreman_tasks_recurring_logic_fk", :column=>"foreman_tasks_recurring_logic_id"})
    -> 0.0040s
 == 20180814202747 AddRecurringLogicToSyncPlan: migrated (0.0071s) =============
 
 == 20180816110716 AddHttpbootDoSubnet: migrating ==============================
 -- add_column(:subnets, :httpboot_id, :integer)
    -> 0.0015s
 -- add_index(:subnets, :httpboot_id)
    -> 0.0099s
 == 20180816110716 AddHttpbootDoSubnet: migrated (0.0117s) =====================
 
 == 20180816142044 AddDescriptionToKatelloModuleStreams: migrating =============
 -- add_column(:katello_module_streams, :description, :text)
    -> 0.0013s
 -- add_column(:katello_module_streams, :summary, :text)
    -> 0.0010s
 == 20180816142044 AddDescriptionToKatelloModuleStreams: migrated (0.0026s) ====
 
 == 20180820072858 AddHelpTextToTemplateKinds: migrating =======================
 -- add_column(:template_kinds, :description, :text)
    -> 0.0071s
 == 20180820072858 AddHelpTextToTemplateKinds: migrated (0.0073s) ==============
 
 == 20180821144248 AddCronLogicToSyncPlans: migrating ==========================
 == 20180821144248 AddCronLogicToSyncPlans: migrated (0.0000s) =================
 
 == 20180828161400 RemoveJoinTableForRoleAndUsage: migrating ===================
 -- remove_foreign_key(:katello_subscription_facet_purpose_roles, :katello_subscription_facets)
    -> 0.0121s
 -- remove_foreign_key(:katello_subscription_facet_purpose_roles, :katello_purpose_roles)
    -> 0.0091s
 -- remove_foreign_key(:katello_subscription_facet_purpose_usages, :katello_subscription_facets)
    -> 0.0098s
 -- remove_foreign_key(:katello_subscription_facet_purpose_usages, :katello_purpose_usages)
    -> 0.0091s
 -- drop_table(:katello_subscription_facet_purpose_roles)
    -> 0.0037s
 -- drop_table(:katello_subscription_facet_purpose_usages)
    -> 0.0024s
 -- drop_table(:katello_subscription_facet_purpose_addons)
    -> 0.0035s
 -- drop_table(:katello_purpose_roles)
    -> 0.0022s
 -- drop_table(:katello_purpose_usages)
    -> 0.0022s
 -- drop_table(:katello_purpose_addons)
    -> 0.0022s
 -- add_column(:katello_subscription_facets, :purpose_usage, :text)
    -> 0.0014s
 -- add_column(:katello_subscription_facets, :purpose_role, :text)
    -> 0.0010s
 -- add_column(:katello_subscription_facets, :purpose_addons, :text)
    -> 0.0009s
 == 20180828161400 RemoveJoinTableForRoleAndUsage: migrated (0.0611s) ==========
 
 == 20180831115634 AddUniquenessToPuppetclassName: migrating ===================
 -- remove_index(:puppetclasses, :name)
    -> 0.0051s
 -- add_index(:puppetclasses, :name, {:unique=>true})
    -> 0.0099s
 == 20180831115634 AddUniquenessToPuppetclassName: migrated (0.1384s) ==========
 
 == 20180903154354 RemoveModulepathSetting: migrating ==========================
 == 20180903154354 RemoveModulepathSetting: migrated (0.0026s) =================
 
 == 20180920123913 DropRepoModuleStreamsTimestampNotNull: migrating ============
 -- change_column(:katello_repository_module_streams, :created_at, :datetime, {:null=>true})
    -> 0.0013s
 -- change_column(:katello_repository_module_streams, :updated_at, :datetime, {:null=>true})
    -> 0.0010s
 -- change_column(:katello_repository_module_streams, :repository_id, :integer, {:null=>true})
    -> 0.0261s
 == 20180920123913 DropRepoModuleStreamsTimestampNotNull: migrated (0.0289s) ===
 
 == 20180920171008 ChangeRepositoryPasswordToText: migrating ===================
 -- change_column(:katello_repositories, :upstream_password, :text)
    -> 0.0016s
 == 20180920171008 ChangeRepositoryPasswordToText: migrated (0.0018s) ==========
 
 == 20180920214134 CreateRepositoryRoot: migrating =============================
 -- adapter_name()
    -> 0.0000s
 -- create_table("katello_root_repositories", {})
    -> 0.0238s
 -- add_foreign_key("katello_root_repositories", "katello_products", {:name=>"katello_root_repositories_product_id", :column=>"product_id"})
    -> 0.0052s
 -- add_foreign_key("katello_root_repositories", "katello_gpg_keys", {:name=>"katello_root_repositories_gpg_key_id", :column=>"gpg_key_id"})
    -> 0.0041s
 -- add_foreign_key("katello_root_repositories", "katello_gpg_keys", {:name=>"katello_root_repositories_ssl_ca_cert_id", :column=>"ssl_ca_cert_id"})
    -> 0.0034s
 -- add_foreign_key("katello_root_repositories", "katello_gpg_keys", {:name=>"katello_root_repositories_ssl_client_cert_id", :column=>"ssl_client_cert_id"})
    -> 0.0032s
 -- add_foreign_key("katello_root_repositories", "katello_gpg_keys", {:name=>"katello_root_repositories_ssl_client_key_id", :column=>"ssl_client_key_id"})
    -> 0.0028s
 -- add_column(:katello_repositories, :root_id, :integer, {:null=>true})
    -> 0.0015s
 -- add_foreign_key("katello_repositories", "katello_root_repositories", {:name=>"katello_root_repositories_repo_id", :column=>"root_id"})
    -> 0.0061s
 -- adapter_name()
    -> 0.0000s
 -- clear_cache!()
    -> 0.0002s
 -- quote_table_name(:katello_repositories)
    -> 0.0001s
 -- execute("ALTER TABLE \"katello_repositories\" ALTER COLUMN \"root_id\" TYPE integer")
    -> 0.0040s
 -- change_column_null(:katello_repositories, :root_id, false, nil)
    -> 0.0010s
 -- rename_column(:katello_repositories, :checksum_type, :saved_checksum_type)
    -> 0.0139s
 -- remove_column(:katello_repositories, :source_repo_checksum_type)
    -> 0.0012s
 -- remove_column(:katello_repositories, "name")
    -> 0.0011s
 -- remove_column(:katello_repositories, "created_at")
    -> 0.0008s
 -- remove_column(:katello_repositories, "updated_at")
    -> 0.0009s
 -- remove_column(:katello_repositories, "major")
    -> 0.0010s
 -- remove_column(:katello_repositories, "minor")
    -> 0.0009s
 -- remove_column(:katello_repositories, "gpg_key_id")
    -> 0.0028s
 -- remove_column(:katello_repositories, "content_id")
    -> 0.0011s
 -- remove_column(:katello_repositories, "arch")
    -> 0.0018s
 -- remove_column(:katello_repositories, "label")
    -> 0.0011s
 -- remove_column(:katello_repositories, "url")
    -> 0.0011s
 -- remove_column(:katello_repositories, "unprotected")
    -> 0.0014s
 -- remove_column(:katello_repositories, "content_type")
    -> 0.0012s
 -- remove_column(:katello_repositories, "product_id")
    -> 0.0029s
 -- remove_column(:katello_repositories, "docker_upstream_name")
    -> 0.0012s
 -- remove_column(:katello_repositories, "mirror_on_sync")
    -> 0.0018s
 -- remove_column(:katello_repositories, "download_policy")
    -> 0.0011s
 -- remove_column(:katello_repositories, "verify_ssl_on_sync")
    -> 0.0016s
 -- remove_column(:katello_repositories, "upstream_username")
    -> 0.0009s
 -- remove_column(:katello_repositories, "upstream_password")
    -> 0.0009s
 -- remove_column(:katello_repositories, "ostree_upstream_sync_policy")
    -> 0.0009s
 -- remove_column(:katello_repositories, "ostree_upstream_sync_depth")
    -> 0.0009s
 -- remove_column(:katello_repositories, "deb_releases")
    -> 0.0011s
 -- remove_column(:katello_repositories, "deb_components")
    -> 0.0009s
 -- remove_column(:katello_repositories, "deb_architectures")
    -> 0.0009s
 -- remove_column(:katello_repositories, "ignore_global_proxy")
    -> 0.0016s
 -- remove_column(:katello_repositories, "ssl_ca_cert_id")
    -> 0.0028s
 -- remove_column(:katello_repositories, "ssl_client_cert_id")
    -> 0.0021s
 -- remove_column(:katello_repositories, "ssl_client_key_id")
    -> 0.0020s
 -- remove_column(:katello_repositories, "ignorable_content")
    -> 0.0009s
 -- remove_column(:katello_repositories, "description")
    -> 0.0009s
 -- remove_column(:katello_repositories, "docker_tags_whitelist")
    -> 0.0010s
 == 20180920214134 CreateRepositoryRoot: migrated (1.4676s) ====================
 
 == 20181001141138 IgnoreTaxonomiesForAuditFilters: migrating ==================
 == 20181001141138 IgnoreTaxonomiesForAuditFilters: migrated (0.0419s) =========
 
 == 20181008201422 AddModulesToErrataPackages: migrating =======================
 -- create_table(:katello_module_stream_erratum_packages)
    -> 0.0245s
 -- add_index(:katello_module_stream_erratum_packages, [:module_stream_id, :erratum_package_id], {:unique=>true, :name=>:katello_module_stream_erratum_package_uniq})
    -> 0.0078s
 -- add_foreign_key(:katello_module_stream_erratum_packages, :katello_module_streams, {:column=>:module_stream_id, :name=>:katello_msep_mod_stream_id_fk})
    -> 0.0036s
 -- add_foreign_key(:katello_module_stream_erratum_packages, :katello_erratum_packages, {:column=>:erratum_package_id, :name=>:katello_msep_erratum_package_id_fk})
    -> 0.0049s
 -- change_column(:katello_module_stream_erratum_packages, :created_at, :datetime, {:null=>true})
    -> 0.0015s
 -- change_column(:katello_module_stream_erratum_packages, :updated_at, :datetime, {:null=>true})
    -> 0.0012s
 == 20181008201422 AddModulesToErrataPackages: migrated (0.0444s) ==============
 
 == 20181017181806 AvailableModuleStreams: migrating ===========================
 -- create_table(:katello_available_module_streams)
    -> 0.0260s
 -- create_table(:katello_host_available_module_streams)
    -> 0.0210s
 -- add_index(:katello_available_module_streams, [:name, :stream], {:unique=>true, :name=>:katello_available_module_streams_name_stream})
    -> 0.0079s
 -- add_foreign_key(:katello_host_available_module_streams, :hosts, {:name=>:katello_hems_host_id_fk, :column=>:host_id})
    -> 0.0040s
 -- add_foreign_key(:katello_host_available_module_streams, :katello_available_module_streams, {:name=>:katello_hems_available_module_stream_id_fk, :column=>:available_module_stream_id})
    -> 0.0044s
 -- add_index(:katello_host_available_module_streams, :available_module_stream_id, {:name=>:index_katello_hems_available_module_stream_id})
    -> 0.0075s
 == 20181017181806 AvailableModuleStreams: migrated (0.0716s) ==================
 
 == 20181027014323 AddApplicableModules: migrating =============================
 -- create_table("katello_content_facet_applicable_module_streams")
    -> 0.0256s
 -- add_foreign_key(:katello_content_facet_applicable_module_streams, :katello_module_streams, {:column=>:module_stream_id, :name=>:katello_cfams_mod_stream_id_fk})
    -> 0.0029s
 -- add_foreign_key(:katello_content_facet_applicable_module_streams, :katello_content_facets, {:column=>:content_facet_id, :name=>:katello_cfams_cf_fk})
    -> 0.0041s
 -- add_index("katello_content_facet_applicable_module_streams", ["module_stream_id", "content_facet_id"], {:name=>"katello_content_facet_module_stream_rid_cfid", :unique=>true})
    -> 0.0075s
 -- add_column(:katello_content_facets, :applicable_module_stream_count, :integer, {:null=>false, :default=>0})
    -> 0.0284s
 -- add_column(:katello_content_facets, :upgradable_module_stream_count, :integer, {:null=>false, :default=>0})
    -> 0.0263s
 == 20181027014323 AddApplicableModules: migrated (0.0960s) ====================
 
 == 20181108171732 ChangeBlogUrl: migrating ====================================
 == 20181108171732 ChangeBlogUrl: migrated (0.0088s) ===========================
 
 foreman-rake db:migrate finished successfully!

Comment 7 errata-xmlrpc 2019-05-14 12:39:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:1222


Note You need to log in before you can comment on or make changes to this bug.