Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1353436 - [upgrade] db migrate failed with error: undefined local variable or method `openscap_proxy_id'
Summary: [upgrade] db migrate failed with error: undefined local variable or method `o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Shlomi Zadok
QA Contact: Kedar Bidarkar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-07 05:25 UTC by Sachin Ghai
Modified: 2019-09-26 14:37 UTC (History)
4 users (show)

Fixed In Version: foreman-1.11.0.48-1,rubygem-foreman_openscap-0.5.3.15-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:43:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
complete exception (38.33 KB, text/plain)
2016-07-07 05:28 UTC, Sachin Ghai
no flags Details
foreman-debug logs (1.15 MB, application/x-xz)
2016-07-07 05:43 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15655 0 Normal Closed [upgrade] db migrate failed with error: undefined local variable or method `openscap_proxy_id' 2020-04-28 09:23:52 UTC
Foreman Issue Tracker 15676 0 Normal Closed Host(group) validations breaks foreman migration 2020-04-28 09:23:52 UTC

Description Sachin Ghai 2016-07-07 05:25:20 UTC
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:

Comment 1 Sachin Ghai 2016-07-07 05:28:14 UTC
Created attachment 1177157 [details]
complete exception

Comment 2 Sachin Ghai 2016-07-07 05:43:30 UTC
Created attachment 1177184 [details]
foreman-debug logs

Comment 4 Shlomi Zadok 2016-07-12 10:02:01 UTC
Created redmine issue http://projects.theforeman.org/issues/15655 from this bug

Comment 5 Bryan Kearney 2016-07-12 12:15:17 UTC
Upstream bug component is Provisioning

Comment 6 Ohad Levy 2016-07-13 13:08:10 UTC
please note that this bz also requires https://github.com/theforeman/foreman_openscap/pull/178 to be pulled in as well.

Comment 7 Bryan Kearney 2016-07-13 14:16:52 UTC
Upstream bug component is SCAP Plugin

Comment 8 Bryan Kearney 2016-07-13 16:15:23 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15676 has been closed

Comment 9 Kedar Bidarkar 2016-07-21 13:05:37 UTC
This issue is not seen while running "Satellite-installer --scenario satellite --upgrade"

VERIFIED with sat62-snap20.2

Comment 10 Bryan Kearney 2016-07-27 11:43:38 UTC
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


Note You need to log in before you can comment on or make changes to this bug.