[Satellite 6.3] Upgrade from 6.2 to 6.3 fails with error:'Failed to destroy the record/opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/persistence.rb:185:in `destroy!`'
Environment
- Red Hat Satellite 6.2.14
- Red Hat Satellite 6.3.x
Issue
- Upgrade from 6.2 to 6.3 fails with error Failed to destroy the record/opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/persistence.rb:185:in
destroy!.
Resolution
-
The issue is coming due to This content is not included.Bug.
-
Meanwhile use the below as workaround in order to fix the same:
-
Comment the below line in file /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.7.11/app/models/foreman_openscap/arf_report.rb
by changing it from before_destroy :destroy_from_proxy to #before_destroy :destroy_from_proxy- Start upgrade again and once upgrade completed successfully revert the above made changes.
-
For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.
Root Cause
- The issue is coming due to This content is not included.Bug.
Diagnostic Steps
- Upgrade fails with following errors:
== 20171010170443 AddIndexToKatelloContentFacetErrata: migrating ==============
-- add_index(:katello_content_facet_errata, :content_facet_id, {:using=>"btree"})rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Failed to destroy the record/opt/rh/rh-ror42/root/usr/share/gems/gems/activerecord-4.2.6/lib/active_record/persistence.rb:185:in `destroy!
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.