Bug 1289200 - Replication: host_storages table, duplicate key
Replication: host_storages table, duplicate key
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
Unspecified Unspecified
high Severity high
: GA
: 5.5.3
Assigned To: Nick Carboni
Jan Krocil
: ZStream
Depends On: 1289156 1301135
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-07 11:24 EST by John Prause
Modified: 2016-04-13 14:39 EDT (History)
10 users (show)

See Also:
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 14:39:36 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)

  None (edit)
Comment 2 CFME Bot 2015-12-11 09:43:05 EST
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 09:43:21 EST
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 09:37:14 EST
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 14:39:36 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:0616

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