Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1329137 - DB migration fail from 5.5 - 5.6 with openstack provider
DB migration fail from 5.5 - 5.6 with openstack provider
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.6.0
Unspecified Unspecified
high Severity high
: Beta 2
: 5.6.0
Assigned To: Ladislav Smola
luke couzens
update:migration:openstack
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-21 05:37 EDT by luke couzens
Modified: 2016-06-29 11:52 EDT (History)
8 users (show)

See Also:
Fixed In Version: 5.6.0.5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 11:52:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description luke couzens 2016-04-21 05:37:34 EDT
Description of problem:migration from 5.5.3.4 to 5.6.0.1-beta2 fails when you have an openstack provider


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


How reproducible:100%


Steps to Reproduce:
1.provision 5.5.3.4 appliance
2.add openstack provider
3.backup database
4.provision blank 5.6.0.1-beta2 appliance
5.ssh to appliance and configure db
6.fetch the v2_key from the 5.5 appliance and set the same region number
7.once the webui is available stop evmserverd
8.scp your backup to 5.6 appliance
9.run dropdb vmdb_production
10.run createdb vmdb_production
11.restore database to 5.6 appliance
12.rake db:migrate

Actual results: rake fails on

== 20160226092911 SeparateOpenstackNetworkManagerFromOpenstackCloudManager: migrating 
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

unknown attribute 'parent_ems_id' for SeparateOpenstackNetworkManagerFromOpenstackCloudManager::ExtManagementSystem./opt/rh/cfme-gemset/bundler/gems/rails-efaa6e4f79d4/activemodel/lib/active_model/attribute_assignment.rb:48:in `_assign_attribute'

Expected results: Migration completes


Additional info:
Comment 2 Greg Blomquist 2016-04-21 10:10:43 EDT
Ladas, can you look at this migration?  It's failing on an upgrade.
Comment 3 Ladislav Smola 2016-04-25 04:16:14 EDT
The field that is missing was added in migration AddParentEmsIdToExtManagementSystem . Has this one succeeded?
Comment 5 CFME Bot 2016-05-02 16:56:02 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/fd2430f1aff2520778ca4e92d8782e01a2f7b8bb

commit fd2430f1aff2520778ca4e92d8782e01a2f7b8bb
Author:     Ladislav Smola <lsmola@redhat.com>
AuthorDate: Mon Apr 25 11:33:28 2016 +0200
Commit:     Ladislav Smola <lsmola@redhat.com>
CommitDate: Mon Apr 25 13:07:04 2016 +0200

    Production migration fail due to cached schema for model
    
    Production migration fails due to cached schema for model. Model
    contains old schema, so the field parent_ems_id, that we created
    couple of migrations back, will not be in the model
    ExtManagementSystem and it will fail on create!. Seems like
    this appears only on production env, where the schema is not
    reloaded. Also this occurs only when we do e.g. upgrade, so
    when migration has some data, before we continue with other
    migrations. This migration is data migration touching OpenStack.
    
    Fixes BZ:
    https://bugzilla.redhat.com/show_bug.cgi?id=1329137

 ...1_separate_openstack_network_manager_from_openstack_cloud_manager.rb | 2 ++
 1 file changed, 2 insertions(+)
Comment 6 luke couzens 2016-05-04 11:43:59 EDT
verified in 5.6.0.5-beta2.4
Comment 9 errata-xmlrpc 2016-06-29 11:52:05 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.

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.