Bug 1217532 - fix_auth with EVM v4 DB causes error
Summary: fix_auth with EVM v4 DB causes error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: GA
: 5.4.0
Assignee: Keenan Brock
QA Contact: Jan Krocil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-30 15:05 UTC by Jan Krocil
Modified: 2015-06-16 13:01 UTC (History)
4 users (show)

Fixed In Version: 5.4.0.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 13:01:08 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Comment 3 CFME Bot 2015-05-01 19:20:48 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/942a7cf4a6e217378385a7bcc63b1d12501ffa72

commit 942a7cf4a6e217378385a7bcc63b1d12501ffa72
Author:     Keenan Brock <kbrock>
AuthorDate: Fri May 1 14:46:53 2015 -0400
Commit:     Keenan Brock <kbrock>
CommitDate: Fri May 1 14:46:53 2015 -0400

    Fix auth now works with evm 4.0 upgrades
    
    active record no longer accesses Rails module in 2 places
    without checks.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1217532

 lib/Gemfile  | 4 ++--
 vmdb/Gemfile | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comment 4 Keenan Brock 2015-05-01 19:27:35 UTC
Please let me know how this goes.

Comment 7 Keenan Brock 2015-05-07 20:14:28 UTC
Merged into master.
Let me know how that works for you.

I can give you tips on a patch if you need.
1 file ~5 lines

Comment 8 Keenan Brock 2015-05-08 20:19:41 UTC
I misspoke. waiting for merge.
Maybe we can test manually patching on monday.

Comment 12 CFME Bot 2015-05-12 20:24:02 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/bd29c0f8d1735900356b94b0154cc6dd5a478b25

commit bd29c0f8d1735900356b94b0154cc6dd5a478b25
Author:     Keenan Brock <kbrock>
AuthorDate: Tue May 12 11:41:20 2015 -0400
Commit:     Keenan Brock <kbrock>
CommitDate: Tue May 12 16:00:31 2015 -0400

    Broke fix_auth --databaseyml in eefd748
    
    It moved the displaying of status information into the common run method. This status had the table name and the columns being updated.
    While this works for all models, it had a problem with FixDatabaseYml. This is not an ActiveRecord model, so it did not have table_name defined. This resulted in a "table_name method not found"
    
    This pr defines FixDatabaseYml.table_name so the status can be printed. And the code can run
    
    Added specs to protect regressions.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1217532

 vmdb/spec/tools/fix_auth/models_spec.rb | 54 +++++++++++++++++++++++++++++++++
 vmdb/tools/fix_auth/models.rb           |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 vmdb/spec/tools/fix_auth/models_spec.rb

Comment 14 CFME Bot 2015-05-14 20:00:22 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e972a829d00abfc198f63958644dc332ec920c69

commit e972a829d00abfc198f63958644dc332ec920c69
Author:     Keenan Brock <kbrock>
AuthorDate: Tue May 12 11:41:20 2015 -0400
Commit:     Keenan Brock <kbrock>
CommitDate: Tue May 12 17:51:24 2015 -0400

    Broke fix_auth --databaseyml in eefd748
    
    It moved the displaying of status information into the common run method. This status had the table name and the columns being updated.
    While this works for all models, it had a problem with FixDatabaseYml. This is not an ActiveRecord model, so it did not have table_name defined. This resulted in a "table_name method not found"
    
    This pr defines FixDatabaseYml.table_name so the status can be printed. And the code can run
    
    Added specs to protect regressions.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1217532

 vmdb/spec/tools/fix_auth/models_spec.rb | 54 +++++++++++++++++++++++++++++++++
 vmdb/tools/fix_auth/models.rb           |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 vmdb/spec/tools/fix_auth/models_spec.rb

Comment 15 CFME Bot 2015-05-14 20:00:26 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1ac92afb7d89b4690d15bf9f038bb54c340a5af4

commit 1ac92afb7d89b4690d15bf9f038bb54c340a5af4
Merge: 12699f8 e972a82
Author:     Joe Rafaniello <jrafanie>
AuthorDate: Wed May 13 09:31:01 2015 -0400
Commit:     Joe Rafaniello <jrafanie>
CommitDate: Wed May 13 09:31:01 2015 -0400

    Merge branch 'fix_auth_databaseyml' into '5.4.z'
    
    Broke fix_auth --databaseyml in eefd748
    
    It moved the displaying of status information into the common run method. This status had the table name and the columns being updated.
    While this works for all models, it had a problem with FixDatabaseYml. This is not an ActiveRecord model, so it did not have table_name defined. This resulted in a "table_name method not found"
    
    This pr defines FixDatabaseYml.table_name so the status can be printed. And the code can run
    
    Added specs to protect regressions.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1217532
    
    See merge request !48

 vmdb/spec/tools/fix_auth/models_spec.rb | 54 +++++++++++++++++++++++++++++++++
 vmdb/tools/fix_auth/models.rb           |  1 +
 2 files changed, 55 insertions(+)

Comment 18 errata-xmlrpc 2015-06-16 13:01:08 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-2015-1100.html


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