Bug 1289936 - unable to display the details of a tenant after upgrading from cloudforms 3.1 to 3.2 in specific conditions
unable to display the details of a tenant after upgrading from cloudforms 3.1...
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
All All
high Severity high
: GA
: 5.6.0
Assigned To: Šimon Lukašík
Pavol Kotvan
Depends On:
  Show dependency treegraph
Reported: 2015-12-09 06:45 EST by Felix Dewaleyne
Modified: 2016-11-29 06:15 EST (History)
12 users (show)

See Also:
Fixed In Version:
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.
Story Points: ---
Clone Of:
Last Closed: 2016-06-29 11:18:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Felix Dewaleyne 2015-12-09 06:45:55 EST
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):

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.
>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 17:01:47 EST
We need to make sure this gets added to the 5.4.x migration article, specifically the resolution mentioned here:


Greg, I assume we should move this to Documentation component.
Comment 7 Šimon Lukašík 2016-04-13 15:24:59 EDT
I am gonna take this with Lada's permission, since I have run into it as well.
Comment 9 CFME Bot 2016-04-18 14:50:46 EDT
New commit detected on ManageIQ/manageiq/master:

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

    Correct STI type after the quota has been renamed
    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 11:18:53 EDT
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.


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