Bug #15655
closed[upgrade] db migrate failed with error: undefined local variable or method `openscap_proxy_id'
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1353436
Description of problem:
While performing upgrade from sat6.1.9 -> sat62 GA snap19, db:migration failed with error:
StandardError: An error has occurred, this and all later migrations canceled:
undefined local variable or method `openscap_proxy_id' for #<Hostgroup:0x0000000df0b150>/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'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.5.3.14/app/models/concerns/foreman_openscap/openscap_proxy_core_extensions.rb:66:in `openscap_proxy_has_feature'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:184:in `call'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:184:in `block in simple'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `block in simple'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `block in simple'
/opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:185:in `call'
Version-Release number of selected component (if applicable):
sat62 GA snap19
How reproducible:
always
Steps to Reproduce:
0. Make sure openscap packages are installed on sat6.1
1. set Sat6.2 repo
2. katello-service stop
3. yum update -y
4. satellite-installer --scenario satellite --upgrade
Actual results:
Expected results:
db: migration succeed and installer should complete successfully
Additional info:
Updated by Shlomi Zadok over 8 years ago
- Project changed from OpenSCAP to Foreman
- Category set to Database
The problem is at the migration itself, as ptable_id is set on the hostgroup (hence an update on hostgroup)
This may happen on other plugins that add validation to the hostgroup.
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3639 added
Updated by The Foreman Bot over 8 years ago
- Pull request https://github.com/theforeman/foreman_openscap/pull/178 added
Updated by Shlomi Zadok over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset cf37d1f470c6eb898b65f0355360684abbabde16.
Updated by Dominic Cleal over 8 years ago
- Category changed from Database to DB migrations
- Translation missing: en.field_release set to 160
Updated by Ohad Levy over 8 years ago
- Pull request deleted (
https://github.com/theforeman/foreman_openscap/pull/178)
Updated by Ivan Necas over 8 years ago
- Related to Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purpose added