Bug 1357632 - Stacktrace when running fix_auth.rb
Summary: Stacktrace when running fix_auth.rb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.7.0
Assignee: Keenan Brock
QA Contact: luke couzens
URL:
Whiteboard: cli
Depends On:
Blocks: 1368171
TreeView+ depends on / blocked
 
Reported: 2016-07-18 17:09 UTC by Alex Krzos
Modified: 2017-01-04 12:57 UTC (History)
8 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1368171 (view as bug list)
Environment:
Last Closed: 2017-01-04 12:57:54 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Stack Trace from fix_auth.rb (7.55 KB, text/plain)
2016-07-18 17:09 UTC, Alex Krzos
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0012 0 normal SHIPPED_LIVE CFME 5.7.0 bug fixes and enhancement update 2017-01-04 17:50:36 UTC

Description Alex Krzos 2016-07-18 17:09:25 UTC
Created attachment 1181193 [details]
Stack Trace from fix_auth.rb

Description of problem:
Importing a large database that requires running the fix_auth script results in a stack trace.


Version-Release number of selected component (if applicable):
5.5.5.2

How reproducible:
Always on 5.5.5.2 with the tested database

Steps to Reproduce:
1. Deploy new 5.5.5.2 appliance
2. Have database deployed
3. Drop deployed database
4. Import new Database
5. Attempt "bundle exec tools/fix_auth.rb --v2 --invalid bogus"
6. View stack trace

Actual results:
Stack traces in 5s

Expected results:


Additional info:

Workaround is the manually edit tools/fix_auth.rb and comment out line:
require File.expand_path('../../config/environment', __FILE__)

Comment 2 Keenan Brock 2016-07-18 17:11:20 UTC
This was introduced by https://github.com/ManageIQ/manageiq/pull/8113 to work around a settings bug.

Comment 3 Keenan Brock 2016-07-19 14:59:15 UTC
A few scattered thoughts:

- the initializer needs to be removed
- YAML.load_safe only loads primitives and may help
- def const_missing may be a good bet as well
- May want to do something similar to MiqQueue.put_or_update which has a development/test only check to block storing objects in db.

Comment 5 Keenan Brock 2016-08-15 16:29:43 UTC
Nick,

Yes. This fixes the bug and has been marked darga/yes. has not been back patched yet - so we can't mark as post

Comment 6 Nick Carboni 2016-08-15 17:29:40 UTC
But this is only 5.7, not 5.6z. I'll mark this as POST with PR https://github.com/ManageIQ/manageiq/pull/10166

Then if we get a clone for 5.6.z we can mark that PR as darga/yes.

Comment 8 Jan Krocil 2016-10-27 08:24:40 UTC
Verified fixed in 5.7.0.7 - 5.7.0.7-beta1.20161025153249_9376fbd.

Comment 11 errata-xmlrpc 2017-01-04 12:57:54 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://rhn.redhat.com/errata/RHBA-2017-0012.html


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