Bug #14965
closedMigration error in foreman_bootdisk upgrading from 6.1 to 6.2
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1333027
Description of problem:
Attempting to upgrade to an early version of Satellite 6.2 Beta (internal build) from 6.1 is resulting in an error during the migration of the foreman_bootdisk plugin.
Version-Release number of selected component (if applicable):
foreman-1.11.0.17-1.el7sat.noarch
tfm-rubygem-foreman_bootdisk-6.1.0-1.el7sat.noarch
How reproducible:
Always
Steps to Reproduce:
1. Install Satellite 6.1
2. Perform a Satellite 6.2 upgrade (e.g. update repos/packages, foreman-installer --upgrade)
Actual results:
Partial error: (Full log will be attached)
[ INFO 2016-05-04 12:50:12 main] Upgrade Step: migrate_foreman...
[ERROR 2016-05-04 12:50:20 main] /opt/theforeman/tfm/root/usr/share/gems/gems/docker-api-1.17.0/lib/docker.rb:103: warning: circular argument reference - connection
rake aborted!
NoMethodError: undefined method `request_uuid' for #<Audited::Adapters::ActiveRecord::Audit:0x0000000a4b69a0>
/opt/rh/rh-ror41/root/usr/share/gems/gems/activemodel-4.1.5/lib/active_model/attribute_methods.rb:435:in `method_missing'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/attribute_methods.rb:208:in `method_missing'
...
...
/usr/share/foreman/app/models/setting.rb:201:in `block in create_existing'
/usr/share/foreman/app/models/setting.rb:210:in `bypass_readonly'
/usr/share/foreman/app/models/setting.rb:197:in `create_existing'
/usr/share/foreman/app/models/setting.rb:173:in `create'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0/app/models/setting/bootdisk.rb:17:in `block (2 levels) in load_defaults'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0/app/models/setting/bootdisk.rb:17:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_bootdisk-6.1.0/app/models/setting/bootdisk.rb:17:in `block in load_defaults'
...
...
Expected results:
No error.
Additional info:
Updated by Martin Bacovsky over 8 years ago
- Related to Bug #10740: Audits created during DB migration of ptables to templates added
Updated by Martin Bacovsky over 8 years ago
- Category set to Audit Log
- Status changed from New to Assigned
Some engines (e.g. bootdisk, discovery) are accessing Settings in their initializers which are executed before the audited initializer that turns off auditing during db:migrate. If audited itself depends on pending migration (e.g. during upgrade) it can fail during rake db:migrate.
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3505 added
Updated by Martin Bacovsky over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 75bb05afca82e564ecf4172e33c4dc7d394d23a6.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release set to 155