Bug 1351997
Summary: | Upgrade fails during migration with undefined method update_attributes | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Eric Helms <ehelms> | ||||
Component: | Installation | Assignee: | Eric Helms <ehelms> | ||||
Status: | CLOSED ERRATA | QA Contact: | Sachin Ghai <sghai> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.2.0 | CC: | bbuckingham, sghai, zhunting | ||||
Target Milestone: | Unspecified | Keywords: | Triaged | ||||
Target Release: | Unused | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | rubygem-katello-3.0.0.57-1 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-27 11:26:17 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1335807 | ||||||
Attachments: |
|
Description
Eric Helms
2016-07-01 11:10:39 UTC
Created from redmine issue http://projects.theforeman.org/issues/15269 Upstream bug assigned to ehelms This is an upgrade issue reported by some users when upgrading to 3.0 from a 2.4 of Katello. This does not affect all users and has not been replicated by engineering but has been encountered by 3 upstream users. I will provide further information and a verification scenario once we are able to figure out the root cause of the issue. This will hopefully be done by getting hold of a helpful users 2.4 database that encountered the issue on upgrade so that we have a replication scenario. Moving to POST since upstream bug http://projects.theforeman.org/issues/15269 has been closed Created attachment 1175163 [details]
Script for generating reproducer data
To reproduce: 1) Install Satellite 6.1 2) Download test data generation script to Satellite 6.1 box 3) If your password is not 'changeme', edit test script and replace changeme with your password 4) Ensure script is executable (chmod +x) 5) Run script 6) Upgrade to Satellite 6.2 Snap 18.1 or less The test data script will generate a variety of fake system objects that are randomized in order to achieve the necessary conditions to enter the reproducer state. To verify: 1) Install Satellite 6.1 2) Download test data generation script to Satellite 6.1 box 3) If your password is not 'changeme', edit test script and replace changeme with your password 4) Ensure script is executable (chmod +x) 5) Run script 6) Upgrade to Satellite 6.2 Snap 19 or greater Thanks Eric, with given script in comment6, I'm able o reproduce the issue: ==> /var/log/foreman-installer/satellite.log <== [ERROR 2016-07-04 04:23:55 main] rake aborted! StandardError: An error has occurred, this and all later migrations canceled: undefined method `update_attribute' for nil:NilClass/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.54/db/migrate/20160222143432_move_system_description_to_host.rb:14:in `block in up' Verified with sat62 GA snap19.1. I ran the test script attached in comment7 and ran upgrade on 6.1.9. I didn't find issue reported in bz description. upgrade was completed successfully. ~]# satellite-installer --scenario satellite --upgrade Upgrading... Upgrade Step: stop_services... Upgrade Step: start_databases... Upgrade Step: update_http_conf... Upgrade Step: migrate_pulp... Upgrade Step: fix_pulp_httpd_conf... Upgrade Step: start_httpd... Upgrade Step: start_qpidd... Upgrade Step: start_pulp... Upgrade Step: migrate_candlepin... Upgrade Step: start_tomcat... Upgrade Step: fix_katello_settings_file... Upgrade Step: migrate_foreman... Upgrade Step: remove_nodes_distributors... Upgrade Step: Running installer... Installing Done [100%] [..................................................................] The full log is at /var/log/foreman-installer/satellite.log Upgrade Step: restart_services... Upgrade Step: db_seed... Upgrade Step: import_package_groups (this may take a while) ... Upgrade Step: import_rpms (this may take a while) ... Upgrade Step: import_distributions (this may take a while) ... Upgrade Step: import_puppet_modules (this may take a while) ... Upgrade Step: import_subscriptions (this may take a while) ... Upgrade Step: elasticsearch_message... Elasticsearch has been removed as a dependency. The database files can be removed manually with #rm -rf /var/lib/elasticsearch. Some packages are no longer needed and can be removed: #rpm -e ruby193-rubygem-tire tfm-rubygem-tire elasticsearch sigar-java sigar snappy-java lucene4-contrib lucene4 Upgrade Step: add_export_distributor (this may take a while) ... Upgrade Step: remove_docker_v1_content (this may take a while) ... Upgrade Step: update_puppet_repository_distributors (this may take a while) ... Upgrade Step: update_subscription_facet_backend_data (this may take a while) ... Upgrade Step: remove_gutterball... Satellite upgrade completed! one error I found in logs at step: add_export_distributor step. Will file another issue for this. Jul 13 08:11:21 qe-sat6-upgrade-rhel7 pulp: celery.worker.job:ERROR: (22429-15584) Task pulp.server.tasks.repository.distributor_update[8bd224ce-1ff8-478d-beae-34762d45e959] raised unexpected: KeyError(u'repo-registry-id',) 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/RHBA-2016:1501 |