Bug 1286120 - post 5.3 => 5.4.2 => 5.4.3.1 upgrade, it is possible to encounter issues interacting with openstack data present since 5.3
Summary: post 5.3 => 5.4.2 => 5.4.3.1 upgrade, it is possible to encounter issues inte...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.4.5
Assignee: Bill Wei
QA Contact: Jan Krocil
URL:
Whiteboard: automate:upgrade:openstack
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-27 11:32 UTC by Felix Dewaleyne
Modified: 2019-10-10 10:34 UTC (History)
15 users (show)

Fixed In Version: 5.4.5.2
Doc Type: Bug Fix
Doc Text:
Deploying 5.4.3.1 appliances after an upgrade from CloudForms Management Engine 5.3, there were several issues raised against the upgraded db. The single-table inheritance mechanism failed to locate the subclass: 'OpenstackResourceQuota'. The error was raised because the column 'type' is reserved for storing the class in case of inheritance. This patch adds service model MiqAeServiceCloudTenantOpenstack which has now resolved the issue.
Clone Of:
Environment:
Last Closed: 2016-03-29 14:14:53 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
hotfix attached (2.00 KB, patch)
2015-12-01 16:21 UTC, Bill Wei
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0171 0 normal SHIPPED_LIVE CFME 5.4.5 bug fixes, and enhancement update 2016-03-29 18:13:52 UTC

Description Felix Dewaleyne 2015-11-27 11:32:35 UTC
Description of problem:
post 5.3 => 5.4.2 => 5.4.3.1 upgrade, it is possible to encounter issues interacting with openstack data present since 5.3

there are several errors raised but they seem to have the same cause here - the issues really started to get noticeable after deploying more 5.4.3.1 appliances against the upgraded db

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

How reproducible:
only in controlled environments

Steps to Reproduce:
1. install cfme 5.3
2. attach an openstack 6 env to it
3. upgrade the appliance to 5.4 following https://access.redhat.com/node/1435433
4. deploy more 5.4.3.1 appliances against the upgraded system


Actual results:
two different issues : when displaying a tenant the error

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]

will show ; when using an automate call cloud_tenants on the management system of a vm hosted in openstack there will be the error
[----] E, [2015-11-24T08:19:16.132135 #28479:4725520] ERROR -- : <AEMethod tenant_test> The following error occurred during method evaluation:
[----] E, [2015-11-24T08:19:16.132811 #28479:4725520] ERROR -- : <AEMethod tenant_test>   NameError: uninitialized constant MiqAeMethodService::MiqAeServiceCloudTenantOpenstack
[----] E, [2015-11-24T08:19:16.134151 #28479:4725520] ERROR -- : <AEMethod tenant_test>   (druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/extensions/as_const_missing_with_sti.rb:43:in `const_missing_with_sti'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:113:in `const_get'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:113:in `block in wrap_results'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:259:in `ar_method'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:107:in `wrap_results'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:111:in `block (2 levels) in wrap_results'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:111:in `collect'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:111:in `block in wrap_results'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:259:in `ar_method'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:107:in `wrap_results'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:123:in `wrap_results'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:96:in `block (2 levels) in expose'
(druby://127.0.0.1:33718) /opt/rh/ruby200/root/usr/share/ruby/drb/drb.rb:1588:in `perform_without_block'
(druby://127.0.0.1:33718) /opt/rh/ruby200/root/usr/share/ruby/drb/drb.rb:1548:in `perform'
(druby://127.0.0.1:33718) /opt/rh/ruby200/root/usr/share/ruby/drb/drb.rb:1626:in `block (2 levels) in main_loop'
(druby://127.0.0.1:33718) /opt/rh/ruby200/root/usr/share/ruby/drb/drb.rb:1622:in `loop'
(druby://127.0.0.1:33718) /opt/rh/ruby200/root/usr/share/ruby/drb/drb.rb:1622:in `block in main_loop'
(druby://127.0.0.1:33718) /var/www/miq/vmdb/lib/extensions/ar_thread.rb:22:in `block in start_with_release'


Expected results:
no error due to a change in the naming of classes

Additional info:
It is believed but unproven that the issue could be due to a db migration problem. It is however certain that the database causes the issue.
the thread http://talk.manageiq.org/t/solved-failed-to-locate-the-subclass-openstackresourcequota/303 seems related to the issue as well.

Comment 5 Felix Dewaleyne 2015-11-27 16:11:01 UTC
I have confirmation that the steps are completely reproducible :


Steps to Reproduce:
1. install cfme 5.3
2. attach an openstack 6 env to it
3. upgrade the appliance to 5.4 following https://access.redhat.com/node/1435433
4. deploy more 5.4.3.1 appliances against the upgraded system

Comment 14 Greg McCullough 2015-11-30 21:24:00 UTC
Bill - The change from this PR needs to be backported to 5.4.z https://github.com/ManageIQ/manageiq/pull/5149.  You originally did the work with Bug 1275405.  Note: Since 5.4.z is before the pluggable provider rename the model name is MiqAeServiceCloudTenantOpenstack.

Comment 15 Bill Wei 2015-12-01 14:17:31 UTC
Backported to 5.4.z

commit 60749a6654a0fb805f832fca67e96fe18fab6ac8
Author: Bill Wei <bilwei>
Date:   Mon Nov 30 17:02:39 2015 -0500

    Add service model MiqAeServiceCloudTenantOpenstack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1286120

Comment 16 Bill Wei 2015-12-01 16:21:30 UTC
Created attachment 1100953 [details]
hotfix attached

Comment 17 CFME Bot 2015-12-02 20:22:25 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=60749a6654a0fb805f832fca67e96fe18fab6ac8

commit 60749a6654a0fb805f832fca67e96fe18fab6ac8
Author:     Bill Wei <bilwei>
AuthorDate: Mon Nov 30 17:02:39 2015 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Mon Nov 30 17:02:50 2015 -0500

    Add service model MiqAeServiceCloudTenantOpenstack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1286120

 .../service_models/miq_ae_service_cloud_tenant_openstack.rb           | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 vmdb/lib/miq_automation_engine/service_models/miq_ae_service_cloud_tenant_openstack.rb

Comment 18 CFME Bot 2015-12-02 20:22:39 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=552e01b77c151e0f2ebae2ebbf9edfb2e3efee7a

commit 552e01b77c151e0f2ebae2ebbf9edfb2e3efee7a
Merge: c52a301 60749a6
Author:     Greg McCullough <gmccullo>
AuthorDate: Mon Nov 30 20:36:53 2015 -0500
Commit:     Greg McCullough <gmccullo>
CommitDate: Mon Nov 30 20:36:53 2015 -0500

    Merge branch '5.4.z_cloud_tenant_openstack' into '5.4.z'
    
    Add service model MiqAeServiceCloudTenantOpenstack
    
    
    Add service model MiqAeServiceCloudTenantOpenstack
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1286120
    
    Original PR: https://github.com/ManageIQ/manageiq/pull/5149
    
    Since it is completely renamed, this commit is created new rather than a cherry pick.
    
    See merge request !563

 .../service_models/miq_ae_service_cloud_tenant_openstack.rb           | 4 ++++
 1 file changed, 4 insertions(+)

Comment 22 errata-xmlrpc 2016-03-29 14:14: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://rhn.redhat.com/errata/RHBA-2016-0171.html


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