Project

General

Profile

Actions

Bug #15301

closed

Katello 3.0 RC8 upgrade failure

Added by John Beranek over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

During db:migrate getting the following error:

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20150930183738 MigrateContentHosts: migrating ==============================
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `inject' for nil:NilClass/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/app/lib/katello/http_resource.rb:197:in `hash_to_query'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/app/lib/katello/resources/candlepin.rb:102:in `get'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:118:in `backend_data'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:122:in `facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:212:in `block in get_systems_with_facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:210:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:210:in `get_systems_with_facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:252:in `ensure_one_system_per_hostname'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:313:in `up'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:598:in `exec_migration'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/opt/rh/rh-ruby22/root/usr/share/ruby/benchmark.rb:288:in `measure'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:in `block in migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `ddl_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:953:in `block in migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:807:in `up'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:785:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'
NoMethodError: undefined method `inject' for nil:NilClass
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/app/lib/katello/http_resource.rb:197:in `hash_to_query'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/app/lib/katello/resources/candlepin.rb:102:in `get'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:118:in `backend_data'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:122:in `facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:212:in `block in get_systems_with_facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:210:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:210:in `get_systems_with_facts'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:252:in `ensure_one_system_per_hostname'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.rc8/db/migrate/20150930183738_migrate_content_hosts.rb:313:in `up'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:598:in `exec_migration'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:579:in `block (2 levels) in migrate'
/opt/rh/rh-ruby22/root/usr/share/ruby/benchmark.rb:288:in `measure'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:578:in `block in migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:577:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:752:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:992:in `block in execute_migration_in_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `block in ddl_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `block in transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:209:in `within_new_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/database_statements.rb:201:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:1038:in `ddl_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:991:in `execute_migration_in_transaction'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:953:in `block in migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `each'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:949:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:807:in `up'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/migration.rb:785:in `migrate'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/railties/databases.rake:34:in `block (2 levels) in <top (required)>'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/opt/rh/rh-ruby22/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/opt/rh/rh-ruby22/root/usr/bin/rake:33:in `<main>'
Tasks: TOP => db:migrate
[root@pal130 ~]# rpm -qa|grep -E '(foreman|pulp|katello)' |sort
foreman-1.11.2-1.el6.noarch
foreman-compute-1.11.2-1.el6.noarch
foreman-debug-1.11.2-1.el6.noarch
foreman-gce-1.11.2-1.el6.noarch
foreman-installer-1.11.2-1.el6.noarch
foreman-installer-katello-3.0.0-10.rc8.el6.noarch
foreman-libvirt-1.11.2-1.el6.noarch
foreman-ovirt-1.11.2-1.el6.noarch
foreman-postgresql-1.11.2-1.el6.noarch
foreman-proxy-1.11.2-1.el6.noarch
foreman-release-1.11.2-1.el6.noarch
foreman-release-scl-2-1.el6.x86_64
foreman-selinux-1.11.2-1.el6.noarch
foreman-vmware-1.11.2-1.el6.noarch
katello-3.0.0-8.rc8.el6.noarch
katello.ad.pvt-apache-1.0-1.noarch
katello.ad.pvt-foreman-client-1.0-1.noarch
katello.ad.pvt-parent-cert-1.0-1.noarch
katello.ad.pvt-qpid-broker-1.0-1.noarch
katello.ad.pvt-qpid-client-cert-1.0-1.noarch
katello-certs-tools-2.4.0-1.el6.noarch
katello-client-bootstrap-1.1.0-1.el6.noarch
katello-common-3.0.0-8.rc8.el6.noarch
katello-debug-3.0.0-8.rc8.el6.noarch
katello-default-ca-1.0-1.noarch
katello-installer-base-3.0.0-10.rc8.el6.noarch
katello-repos-3.0.0-2.el6.noarch
katello-selinux-3.0.1-1.el6.noarch
katello-server-ca-1.0-1.noarch
katello-service-3.0.0-8.rc8.el6.noarch
m2crypto-0.21.1.pulp-8.el6.x86_64
mod_wsgi-3.4-2.pulp.el6.x86_64
pal130.ad.pvt-foreman-client-1.0-5.noarch
pal130.ad.pvt-foreman-proxy-1.0-5.noarch
pal130.ad.pvt-foreman-proxy-client-1.0-2.noarch
pulp-admin-client-2.8.3-1.el6.noarch
pulp-client-1.0-1.noarch
pulp-docker-plugins-2.0.1-1.el6.noarch
pulp-katello-1.0-1.el6.noarch
pulp-puppet-plugins-2.8.3-1.el6.noarch
pulp-puppet-tools-2.8.3-1.el6.noarch
pulp-rpm-admin-extensions-2.8.3-1.el6.noarch
pulp-rpm-plugins-2.8.3-1.el6.noarch
pulp-selinux-2.8.3-1.el6.noarch
pulp-server-2.8.3-1.el6.noarch
python-isodate-0.5.0-4.pulp.el6.noarch
python-kombu-3.0.33-5.pulp.el6.noarch
python-pulp-bindings-2.8.3-1.el6.noarch
python-pulp-client-lib-2.8.3-1.el6.noarch
python-pulp-common-2.8.3-1.el6.noarch
python-pulp-docker-common-2.0.1-1.el6.noarch
python-pulp-oid_validation-2.8.3-1.el6.noarch
python-pulp-puppet-common-2.8.3-1.el6.noarch
python-pulp-repoauth-2.8.3-1.el6.noarch
python-pulp-rpm-common-2.8.3-1.el6.noarch
python-pulp-streamer-2.8.3-1.el6.noarch
python-rhsm-1.8.0-2.pulp.el6.x86_64
rubygem-smart_proxy_pulp-1.2.0-1.el6.noarch
tfm-rubygem-foreman_bootdisk-7.0.1-1.fm1_11.el6.noarch
tfm-rubygem-foreman_discovery-5.0.2-1.fm1_11.el6.noarch
tfm-rubygem-foreman_docker-2.1.1-1.fm1_11.el6.noarch
tfm-rubygem-foreman_gutterball-0.0.1-3.el6.noarch
tfm-rubygem-foreman_hooks-0.3.9-2.fm1_11.el6.noarch
tfm-rubygem-foreman-tasks-0.7.17-1.fm1_11.el6.noarch
tfm-rubygem-hammer_cli_foreman-0.6.2-1.el6.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-4.el6.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-5.el6.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.10-1.fm1_11.el6.noarch
tfm-rubygem-hammer_cli_katello-0.0.26-1.el6.noarch
tfm-rubygem-katello-3.0.0-11.rc8.el6.noarch

Files

katello-installer.1.log katello-installer.1.log 1.47 MB Installer logs from first run on katello-installer John Beranek, 06/06/2016 08:55 AM
db_migrate.log db_migrate.log 38.5 KB John Beranek, 06/06/2016 09:06 AM
katello.1.log katello.1.log 1.3 MB John Beranek, 06/06/2016 09:24 AM
Actions #4

Updated by John Beranek over 8 years ago

Please ignore katello-installer.1.log - it is an OLD installer file

Actions #6

Updated by Justin Sherrill over 8 years ago

It seems this is due to some system that has not completely registered. We'll need to handle this case.

Actions #7

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Justin Sherrill
  • Pull request https://github.com/Katello/katello/pull/6109 added
Actions #8

Updated by Justin Sherrill over 8 years ago

  • Bugzilla link set to 1343999
Actions #9

Updated by John Beranek over 8 years ago

Justin Sherrill wrote:

It seems this is due to some system that has not completely registered. We'll need to handle this case.

Interesting - I've reverted the upgraded system back to a snapshot, and found that the "Content Hosts" screen was throwing errors on a particular section of hosts. By trial and error (and a bit of digging in the database) managed to find 2 systems that were in the DB but had no UUID.

After deleting these records manually (and the foreign key references) I can now list all of our content hosts.

So, should I try another upgrade now?

Actions #10

Updated by Justin Sherrill over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF