Project

General

Profile

Actions

Bug #24649

closed

Katello Upgrade from 3.6.0 to 3.7.0 fails on subscription import

Added by Martin Angermeier over 6 years ago. Updated over 6 years ago.

Status:
Duplicate
Priority:
High
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Hi everybody,

we use Foreman 1.17.1 and Katello 3.6.0. We tried to update to Foreman 1.18 and Katello 3.7.0. Everything runs fine until we execute the installer with

foreman-installer --scenario katello --upgrade

The error is "ERROR: column katello-subscriptions.product_id does not exist"

Here's the log:

Upgrade Step: set_upstream_pool_id (this may take a while) ...
/usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here
/usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here
rake aborted!
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR: column katello_subscriptions.product_id does not exist
LINE 1: ...katello_subscriptions"."organization_id" = $1 AND "katello_s...
^
: SELECT "katello_subscriptions".* FROM "katello_subscriptions" WHERE "katello_subscriptions"."organization_id" = $1 AND "katello_subscriptions"."product_id" = $2 LIMIT $3
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:682:in `prepare'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:682:in `block in prepare_statement'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:677:in `prepare_statement'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:622:in `exec_cache'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:605:in `execute_and_clear'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:79:in `exec_query'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:375:in `select_prepared'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:40:in `select_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/query_cache.rb:97:in `select_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/querying.rb:39:in `find_by_sql'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:678:in `exec_queries'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:546:in `load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:255:in `records'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/finder_methods.rb:508:in `find_take'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/finder_methods.rb:100:in `take'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/finder_methods.rb:78:in `find_by'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/querying.rb:7:in `find_by'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/core.rb:208:in `find_by'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/pool.rb:85:in `stacking_subscription'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/pool.rb:104:in `import_data'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/candlepin_object.rb:44:in `block (2 levels) in import_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/candlepin_object.rb:42:in `block in import_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/candlepin_object.rb:38:in `import_all'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/lib/katello/tasks/import_subscriptions.rake:6:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
PG::UndefinedColumn: ERROR: column katello_subscriptions.product_id does not exist
LINE 1: ...katello_subscriptions"."organization_id" = $1 AND "katello_s...
^
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:682:in `prepare'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:682:in `block in prepare_statement'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:677:in `prepare_statement'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:622:in `exec_cache'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:605:in `execute_and_clear'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/postgresql/database_statements.rb:79:in `exec_query'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:375:in `select_prepared'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/database_statements.rb:40:in `select_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/connection_adapters/abstract/query_cache.rb:97:in `select_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/querying.rb:39:in `find_by_sql'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:678:in `exec_queries'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:546:in `load'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation.rb:255:in `records'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/finder_methods.rb:508:in `find_take'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/finder_methods.rb:100:in `take'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/finder_methods.rb:78:in `find_by'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/querying.rb:7:in `find_by'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/core.rb:208:in `find_by'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/pool.rb:85:in `stacking_subscription'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/pool.rb:104:in `import_data'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/candlepin_object.rb:44:in `block (2 levels) in import_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/candlepin_object.rb:42:in `block in import_all'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.6/lib/active_record/relation/delegation.rb:39:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/candlepin_object.rb:38:in `import_all'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/lib/katello/tasks/import_subscriptions.rake:6:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => katello:import_subscriptions
(See full trace by running task with --trace)
Importing Subscriptions
foreman-rake katello:import_subscriptions failed! Check the output for error!
Upgrade step set_upstream_pool_id failed. Check logs for more information.

Regards,
Martin Angermeier


Related issues 1 (0 open1 closed)

Is duplicate of Katello - Bug #24374: User db upgrade from 3.4 to 3.7 failed at Upgrade Step: set_upstream_pool_idClosedJustin SherrillActions
Actions #1

Updated by Andrew Kofink over 6 years ago

  • Priority changed from Normal to High
  • Target version set to Katello 3.7.1
  • Triaged changed from No to Yes
Actions #2

Updated by Jonathon Turel over 6 years ago

  • Is duplicate of Bug #24374: User db upgrade from 3.4 to 3.7 failed at Upgrade Step: set_upstream_pool_id added
Actions #3

Updated by Jonathon Turel over 6 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF