Bug 1289200 - Replication: host_storages table, duplicate key
Summary: Replication: host_storages table, duplicate key
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance   
(Show other bugs)
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.5.3
Assignee: Nick Carboni
QA Contact: Jan Krocil
URL:
Whiteboard:
Keywords: ZStream
Depends On: 1289156 1301135
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-07 16:24 UTC by John Prause
Modified: 2016-04-13 18:39 UTC (History)
10 users (show)

Fixed In Version: 5.5.2.1
Doc Type: Bug Fix
Doc Text:
Upgrading to the previous version of CloudForms Management Engine from an earlier version could result in a database replication failure with a duplicate key present error on the master appliance. This error was a result of id numbers from the incorrect region being assigned to host storage records. This bug was fixed by removing the records with the incorrect ids and resetting the replication triggers to the correct region. Database replication completes successfully in the new version of CloudForms Management Engine.
Story Points: ---
Clone Of: 1289156
Environment:
Last Closed: 2016-04-13 18:39:36 UTC
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:0616 normal SHIPPED_LIVE CFME 5.5.3 bug fixes and enhancement update 2016-04-13 22:38:44 UTC

Comment 2 CFME Bot 2015-12-11 14:43:05 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=8d95d01585bcde5f320fa6c6a5bf46cb7fbfcaf1

commit 8d95d01585bcde5f320fa6c6a5bf46cb7fbfcaf1
Author:     Nick Carboni <ncarboni@redhat.com>
AuthorDate: Tue Dec 8 16:06:55 2015 -0500
Commit:     Nick Carboni <ncarboni@redhat.com>
CommitDate: Wed Dec 9 14:39:01 2015 -0500

    Add migration to fix host_storages replication issue
    
    After we run the migration added in commit 04f2fa211b8ebeb0557ca3712af846c9b556869f
    the table host_storages will be assigned a primary key column and existing
    rows will be given a value within the current region's range.
    
    This causes an issue when run on a replication target as the id should
    match the one on the replication source region not the target one.
    
    This fix removes the entries in the host_storages table on the target
    region and resets the replication triggers on the source regions.
    
    Upstream PR: https://github.com/ManageIQ/manageiq/pull/5760
    Clean cherry-pick from upstream master
    https://bugzilla.redhat.com/show_bug.cgi?id=1289200

 ...0956_fix_host_storage_replication_on_upgrade.rb | 49 ++++++++++++++++++++++
 ...fix_host_storage_replication_on_upgrade_spec.rb | 47 +++++++++++++++++++++
 2 files changed, 96 insertions(+)
 create mode 100644 db/migrate/20151208150956_fix_host_storage_replication_on_upgrade.rb
 create mode 100644 spec/migrations/20151208150956_fix_host_storage_replication_on_upgrade_spec.rb

Comment 3 CFME Bot 2015-12-11 14:43:21 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b91ec3af94818b1905e371327f535ae15628a42a

commit b91ec3af94818b1905e371327f535ae15628a42a
Merge: 49e4bd5 8d95d01
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Fri Dec 11 09:38:16 2015 -0500
Commit:     Gregg Tanzillo <gtanzill@redhat.com>
CommitDate: Fri Dec 11 09:38:16 2015 -0500

    Merge branch 'backport_host_storage_replication_fix' into '5.5.z'
    
    Add migration to fix host_storages replication issue
    
    After we run the migration added in commit 04f2fa211b8ebeb0557ca3712af846c9b556869f
    the table host_storages will be assigned a primary key column and existing
    rows will be given a value within the current region's range.
    
    This causes an issue when run on a replication target as the id should
    match the one on the replication source region not the target one.
    
    This fix removes the entries in the host_storages table on the target
    region and resets the replication triggers on the source regions.
    
    Upstream PR: https://github.com/ManageIQ/manageiq/pull/5760
    
    Clean cherry-pick from upstream master
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1289200
    
    See merge request !607

 ...0956_fix_host_storage_replication_on_upgrade.rb | 49 ++++++++++++++++++++++
 ...fix_host_storage_replication_on_upgrade_spec.rb | 47 +++++++++++++++++++++
 2 files changed, 96 insertions(+)

Comment 9 John Prause 2016-02-10 14:37:14 UTC
This was dropped from the 5.5.2 advisory.
The 5.5.2 advisory is in Rel_prep, so will move the TR to 5.5.3

Comment 16 errata-xmlrpc 2016-04-13 18:39:36 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://access.redhat.com/errata/RHBA-2016:0616


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