Project

General

Profile

Actions

Bug #15655

closed

[upgrade] db migrate failed with error: undefined local variable or method `openscap_proxy_id'

Added by Shlomi Zadok over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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:


Related issues 1 (1 open0 closed)

Related to Foreman - Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purposeNew07/27/2016Actions
Actions #1

Updated by Shlomi Zadok over 7 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.

Actions #2

Updated by The Foreman Bot over 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3639 added
Actions #3

Updated by The Foreman Bot over 7 years ago

  • Pull request https://github.com/theforeman/foreman_openscap/pull/178 added
Actions #4

Updated by Shlomi Zadok over 7 years ago

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

Updated by Dominic Cleal over 7 years ago

  • Category changed from Database to DB migrations
  • translation missing: en.field_release set to 160
Actions #6

Updated by Ohad Levy over 7 years ago

  • Pull request deleted (https://github.com/theforeman/foreman_openscap/pull/178)
Actions #7

Updated by Ivan Necas over 7 years ago

  • Related to Refactor #15866: Provide alternative way of migrating data as oposed misuing db:migrate for this purpose added
Actions

Also available in: Atom PDF