Jan, can you setup another 5.4 appliance connected to the same OpenStack. I need to see the appliance *before* it's migrated to 5.5. I need to be able to see if there are any incorrectly classified CloudTenants in the database before the migration. Thanks!
I setup a 5.4 appliance and added a rhos7 to the appliance. Here's what I see in the cloud_tenants table: > # select id, name, description, ems_ref, type from cloud_tenants; > id | name | description | ems_ref | type > ----+---------+--------------+----------------------------------+------ > 1 | tenant2 | | 48c71cc5d3444ab2b22a85443d7037b6 | > 2 | admin | admin tenant | ff5ee96505a9421fa973482c3938e22e | > (2 rows) Looks like the type field was never set in 5.4. I'll look at the migration instructions to see what it says. There might be some clues in there as to what happens to these records.
K, I think I tracked it down. A long time ago I added the `type` column to the cloud_tenants table and I added a migration to make sure all cloud tenants had the right type for OpenStack (which, at the time was CloudTenantOpenstack). But, I didn't add anything to the refresh parser to set the cloud tenant type during inventory collection. So, any openstack tenants collected by a clean 5.4 appliance will have the cloud_tenants type column, but it will be empty (see comment #6). Then, the 5.5 migration attempts to change all cloud tenants from CloudTenantOpenstack to ManageIQ::Providers::Openstack::CloudTenant. But, it doesn't find any CloudTenantOpenstack records, so migrates nothing. Everything without an explicit type in the type column will end up the base class (CloudTenant), so we see the error. I think the fix is to create a migration that moves all cloud_tenants with no type to ManageIQ::Providers::Openstack::CloudTenant. I'll have to see if this should be done purely in 5.5.z, or if it should be done upstream too. The other alternative is to just update the migration docs with an extra step that converts the wrong cloud tenant records.
https://github.com/ManageIQ/manageiq/pull/9129
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/43d2c94d7088b16da7b04321c356feca666ef6d1 commit 43d2c94d7088b16da7b04321c356feca666ef6d1 Author: Ladislav Smola <lsmola> AuthorDate: Fri Jun 3 16:22:28 2016 +0200 Commit: Ladislav Smola <lsmola> CommitDate: Fri Jun 3 16:22:28 2016 +0200 Fix CloudTenant missing type Fix CloudTenant missing type Fixes BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1333806 ...60603125531_correct_sti_type_on_cloud_tenant.rb | 15 +++++++++ ...125531_correct_sti_type_on_cloud_tenant_spec.rb | 39 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 db/migrate/20160603125531_correct_sti_type_on_cloud_tenant.rb create mode 100644 spec/migrations/20160603125531_correct_sti_type_on_cloud_tenant_spec.rb
To verify this I will need to migrate from 5.4 to 5.6, currently this is blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1344112
https://github.com/ManageIQ/manageiq/pull/9133
Verified in 5.6.0.11
https://github.com/ManageIQ/manageiq/pull/7620
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