Bug 1385157 - Configuring pglogical replication after setting up HA fails
Summary: Configuring pglogical replication after setting up HA fails
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Replication
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: 5.8.0
Assignee: Nick Carboni
QA Contact: Alex Newman
URL:
Whiteboard:
Depends On:
Blocks: 1386770
TreeView+ depends on / blocked
 
Reported: 2016-10-14 20:21 UTC by Nick Carboni
Modified: 2018-01-19 21:21 UTC (History)
4 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1386770 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:57:18 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nick Carboni 2016-10-14 20:21:01 UTC
Description of problem:
Attempting to configure pglogical replication (setting replication type to remote) on a database which was previously configured as a HA cluster (using repmgr) fails with the following error:

Error during replication configuration save: ERROR: table repl_monitor cannot be added to replication set miq DETAIL: table does not have PRIMARY KEY and given replication set is configured to replicate UPDATEs and/or DELETEs HINT: Add a PRIMARY KEY to the table

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

This is happening because we are attempting to add the repmgr internal tables to the replication set and those tables do not all have primary keys.

We should never replicate these tables to the global region, so they should be excluded.

Comment 4 CFME Bot 2016-10-18 21:26:08 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a3d87b41557c1cc974c0bb35ed1f14238ca13a5a

commit a3d87b41557c1cc974c0bb35ed1f14238ca13a5a
Author:     Nick Carboni <ncarboni>
AuthorDate: Fri Oct 14 16:26:51 2016 -0400
Commit:     Nick Carboni <ncarboni>
CommitDate: Tue Oct 18 14:51:33 2016 -0400

    Add repmgr tables to replication excludes
    
    We don't control the structure or contents of these tables, so we
    cannot replicate them.
    
    They are in a different schema, but we need them accessible without
    being fully qualified because the schema name is dependent on the region
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1385157

 config/settings.yml | 3 +++
 1 file changed, 3 insertions(+)

Comment 5 CFME Bot 2016-10-19 04:27:07 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/bce8d4928c1a83ca8952a39a2597e1a2c70ff807

commit bce8d4928c1a83ca8952a39a2597e1a2c70ff807
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Tue Oct 18 17:23:22 2016 -0400
Commit:     Oleg Barenboim <chessbyte>
CommitDate: Tue Oct 18 23:23:08 2016 -0500

    Merge pull request #11959 from carbonin/add_repmgr_tables_to_replication_excludes
    
    Add repmgr tables to replication excludes
    (cherry picked from commit c5167997d2cc5c801cf3f599edc49fc049a2123c)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1385157

 app/models/miq_region.rb                    | 2 +-
 config/settings.yml                         | 3 +++
 lib/miq_pglogical.rb                        | 3 ++-
 spec/replication/util/miq_pglogical_spec.rb | 3 ++-
 4 files changed, 8 insertions(+), 3 deletions(-)


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