Red Hat Bugzilla – Bug 1289936
unable to display the details of a tenant after upgrading from cloudforms 3.1 to 3.2 in specific conditions
Last modified: 2016-11-29 06:15:57 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):
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
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]
the page displays
- 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")
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.
I am gonna take this with Lada's permission, since I have run into it as well.
New commit detected on ManageIQ/manageiq/master:
Author: Šimon Lukašík <firstname.lastname@example.org>
AuthorDate: Wed Apr 13 21:29:20 2016 +0200
Commit: Šimon Lukašík <email@example.com>
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
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.