Bug 1289936 - unable to display the details of a tenant after upgrading from cloudforms 3.1 to 3.2 in specific conditions
Summary: unable to display the details of a tenant after upgrading from cloudforms 3.1...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.4.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.6.0
Assignee: Šimon Lukašík
QA Contact: Pavol Kotvan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-09 11:45 UTC by Felix Dewaleyne
Modified: 2019-10-10 10:39 UTC (History)
12 users (show)

Fixed In Version: 5.6.0.4
Doc Type: Bug Fix
Doc Text:
Previously, there was an issue with displaying the details of a tenant after upgrading from CloudForms 3.1 to 3.2 when an OpenStack 6 instance was registered pre-upgrade. This was because migration was missing when OpenstackResourceQuota was renamed to CloudResourceQuotaOpenstack. With this fix, the correct STI type after the quota has been renamed.
Clone Of:
Environment:
Last Closed: 2016-06-29 15:18:53 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-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Felix Dewaleyne 2015-12-09 11:45:55 UTC
Description of problem:
unable to display the details of a tenant after upgrading from cloudforms 3.1 to 3.2 when an openstack 6 instance was registered pre-upgrade

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


How reproducible:
all the time

Steps to Reproduce:
1. install 3.1
2. register an openstack 6 instance as cloud provider to it
3. go to cloud>tenants
4. click on any tenant

Actual results:
The single-table inheritance mechanism failed to locate the subclass: 'OpenstackResourceQuota'. This error is raised because the column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend it to be used for storing the inheritance class or overwrite CloudResourceQuota.inheritance_column to use another column for that information. [cloud_tenant/show] 

Expected results:
the page displays

Additional info:
- the provider uses the admin account
- this is resolved by using http://talk.manageiq.org/t/solved-failed-to-locate-the-subclass-openstackresourcequota/303 : 

>the sub-class was renamed in commit 6f55529 and it seems you have records in >the cloud_resource_quotas table with the old name.
>
>You can correct this two ways:
>
>1. Delete those records from the table and refresh the provider to repopulate them with the expected sub-class name.
>or
>2. Run the following data migration from the rails console:
>
>CloudResourceQuota.where(:type => "OpenstackResourceQuota").update_all(:type => "CloudResourceQuotaOpenstack")

Comment 3 Dave Johnson 2015-12-10 22:01:47 UTC
We need to make sure this gets added to the 5.4.x migration article, specifically the resolution mentioned here:

http://talk.manageiq.org/t/solved-failed-to-locate-the-subclass-openstackresourcequota/303

Greg, I assume we should move this to Documentation component.

Comment 7 Šimon Lukašík 2016-04-13 19:24:59 UTC
I am gonna take this with Lada's permission, since I have run into it as well.

Comment 9 CFME Bot 2016-04-18 18:50:46 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/3dfe9438ba3aa90f8a66e96c5d8536f05bf66cf9

commit 3dfe9438ba3aa90f8a66e96c5d8536f05bf66cf9
Author:     Šimon Lukašík <isimluk>
AuthorDate: Wed Apr 13 21:29:20 2016 +0200
Commit:     Šimon Lukašík <isimluk>
CommitDate: Thu Apr 14 11:51:43 2016 +0200

    Correct STI type after the quota has been renamed
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1289936
    
    Original rename was #666. The other one was due to provider namespacing.
    I prefer to re-run rename on both old names, as we have workaround for
    rhbz#1289936 public and users might have applied it manually at any time.

 ...759_correct_sti_type_on_cloud_resource_quota.rb | 18 +++++++++
 ...orrect_sti_type_on_cloud_resource_quota_spec.rb | 43 ++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 db/migrate/20160413191759_correct_sti_type_on_cloud_resource_quota.rb
 create mode 100644 spec/migrations/20160413191759_correct_sti_type_on_cloud_resource_quota_spec.rb

Comment 14 errata-xmlrpc 2016-06-29 15:18:53 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:1348


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